Trustly - S2S Integration

Let your customers make payments using Trustly on your website or app with S2S Integration.


Feature Request

  • This is an on-demand feature. Please raise a request with our to get this feature activated on your Razorpay account.
  • Watch this video to know how to raise a feature enablement request on the Razorpay Dashboard.
Feature Request GIF

  1. for a Razorpay account.
  2. Generate API Keys
  3. Follow the .

  • Create an Order.
  • Pass method and provider parameters in Create Payments API.

Order is an important step in the payment process.

  1. An order should be created for every payment.
  2. You can create an order using the . It is a server-side API call. Know how to Orders API.
  3. Pass the order_id received in response to the checkout. This ties the Order with the payment and secures the request from being tampered.

The following is a sample API request and response for creating an order:

curl -X POST https://api.razorpay.com/v1/orders
-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
-H 'content-type:application/json'
-d '{
"amount": 50000,
"currency": "INR",
"receipt": "rcptid_11"
}'

Here is the list of parameters and their description for creating an order:

amount

mandatory

integer The transaction amount, expressed in the currency subunit. For example, for an actual amount of ₹299.35 , the value of this field should be 29935.

currency

mandatory

string The currency in which the transaction should be made. See the

. Length must be 3 characters.

receipt

optional

string Your receipt id for this order should be passed here. Maximum length is 40 characters.

notes

optional

json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

partial_payment

optional

boolean Indicates whether the customer can make a partial payment. Possible values:

  • true: The customer can make partial payments.
  • false (default): The customer cannot make partial payments.

id

mandatory

string Unique identifier of the customer. For example, cust_1Aa00000000004.

Know more about

.

The error response parameters are available in the

.

The following is a sample API to create a payment.

{
"razorpay_payment_id": "pay_xxxx",
"next": [
{
"action": "poll",
"url": "https://api.razorpay.com/v1/payments/pay_xxx/status"
}
]
}

Along with the other Create Payment API request parameters, you must pass:

method

mandatory

string The method used to make the payment. Here, it must be app.

provider

mandatory if method=app

string Name of the PSP app. Here, it must be trustly.


Is this integration guide useful?