MOTO Payments - S2S

Know how you can configure MOTO payments on your S2S integration.


With Razorpay, you can use MOTO (Mail-Order-Telephone-Order) transactions to charge a customer's credit card without using the CVV or 2-factor-authentication. You can extend this flow to your customers to reduce payment failures that may occur due to low internet speeds or redirects to bank pages.

Order creation is the first step to integrate your application with Razorpay and start accepting payments. Orders API allows you to create an Order when a payment is expected from a customer.

Ensure the razorpay_order_id is stored against the corresponding transaction. The API endpoint given below will create an Order at your server-side:

POST
/orders

Order is an important step in the payment process.

  • An order should be created for every payment.
  • You can create an order using the . It is a server-side API call. Know how to Orders API.
  • The order_id received in the response should be passed 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

optional

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

Know more about

.

The error response parameters are available in the

.

Use the order_id, that is the id returned in the

to create a payment. The API endpoint given below creates a payment using cards. Your customers can make payments by providing either card details or the token id.

Use the following endpoint to make payment using card details.

POST
/payments/create
curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET>
-X POST https://api.razorpay.com/v1/payments/create
-H 'content-type:application/json'
-d '{
"amount": 50000,
"currency": "INR",
"email": "gaurav.kumar@example.com",
"contact": 9000090000,
"order_id": "order_DBJOWzybf0sJbb",
"method": "card",
"card":{
"number": "5104060000000008",
"name": "Gaurav Kumar",
"expiry_month": "01",
"expiry_year": "22"
},
"auth_type": "skip"
}'

According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers.

Use the following endpoint to make payment using token id.

POST
/payments/create
curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET>
-X POST https://api.razorpay.com/v1/payments/create
-H 'content-type:application/json'
-d '{
"amount":100,
"currency":"INR",
"contact":"9164544995",
"email":"shivamyuvraaj1@gmail.com",
"order_id": "order_JfhhSvgLYUDoNC",
"token":"token_IaoGJDRc9eRff0",
"customer_id" :"cust_IaV8vdrgdosxe6",
"auth_type":"skip"
}'

If the payment is successful, you can query the razorpay_order_id in your database and mark the corresponding transaction at your end as paid.

You can create bulk payments from the

. Know more about .


Is this integration guide useful?