ACH Direct Debit
Steps to integrate S2S JSON API and accept payments using ACH Direct Debit.
ACH (Automated Clearing House) is an electronic network that processes bank-to-bank payments in batches. ACH Direct Debit enables you to withdraw funds directly from a customer's US bank account using their account and routing numbers, with transactions settling within 3-5 business days.
Follow the steps below to integrate Razorpay S2S JSON API and accept payments using ACH.
1.1
1.2
1.3
1.4
1.5
To process a payment, create a Razorpay Order to correspond with the order in your system. Send the order request parameters to the following endpoint:
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_idreceived in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
Watch Out!
Payments made without an order_id cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing.
Use this endpoint to create an order using the Orders API.
curl -X POST https://api.razorpay.com/v1/orders-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET]-H 'content-type:application/json'-d '{"amount": 100,"currency": "MYR","receipt": "qwsaq1","partial_payment": true,"first_payment_min_amount": 230,"notes": {"key1": "value3","key2": "value2"}}'
{"id": "order_IluGWxBm9U8zJ8","entity": "order","amount": 100,"amount_paid": 0,"amount_due": 100,"currency": "MYR","receipt": "rcptid_11","offer_id": null,"status": "created","attempts": 0,"notes": [],"created_at": 1642662092}
amount
mandatory
integer Payment amount in the smallest currency subunit. For example, if the amount is RM 500, enter 50000.
currency
mandatory
string The currency in which the payment should be made by the customer. Length must be of 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.
first_payment_min_amount
optional
integer Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of RM 7,000 is to be received from the customer in two installments of #1 - RM 5,000, #2 - RM 2,000 then you can set this value as 500000. This parameter should be passed only if partial_payment is true.
Know more about
.Descriptions for the response parameters are present in the
parameters table.The error response parameters are available in the
.Once an order is created, your next step is to create a payment. The following API will create a payment with ach as the payment method:
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \-X POST https://api.razorpay.com/v1/payments/create/json \-H "content-type: application/json" \-d '{"amount": 50000,"currency": "","order_id": "order_GAWN9beXgaqRyO","email": "nur.aisyah@example.com","contact": "+60123456789","method": "ach","bank_account": {"account_number": "000000001234","name": " Nur Aisyah","bank_code": "122105278","bank_code_category": "routing_number","account_type": "personal_savings"},"billing_address": {"line1": "Block","line2": "Street","city": "San Jose","state": "California","postal_code": "33154"}}'
{"razorpay_payment_id": "pay_29QQoUBi66xm2f","razorpay_order_id": "order_GAWN9beXgaqRyO","razorpay_signature": "9ef4dffbfd84f1318f6ae648f114332d8401e0949a3d"}
amount
mandatory
integer Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is RM 299, then pass 29900 in this field.
currency
mandatory
string Currency code for the currency in which you want to accept the payment. For example, USD.
order_id
mandatory
string Unique identifier of the Order.
Know more about
mandatory
string Email address of the customer. Maximum length supported is 40 characters.
contact
mandatory
string Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code.
method
mandatory
string Name of the payment method. Here it is ach.
bank_account
mandatory
object Bank account details.
account_number
mandatory
string Customer's bank account number.
name
mandatory
string Account holder's name as per bank records.
bank_code
mandatory
string The ACH routing number of the bank account.
bank_code_category
mandatory
string The category of bank code. Must be routing_number for ACH payments.
account_type
mandatory
string Type of bank account. Possible values:
personal_savings: Individual savings account.personal_checking: Individual current account.business_savings: Business savings account.business_checking: Business current account.
billing_address
optional
json object This will have details about the billing address of the customer/user.
line1
optional
string Address Line 1 of the address.
line2
optional
string Address Line 2 of the address.
city
optional
string City of the address. For example, San Jose.
state
optional
string Name of the state. For example, California.
postal_code
optional
string Postal code of the state. For example, 33514.
The payment request for each of the supported payment methods will slightly vary. Know more about the
.If the payment request is valid, the response contains the following fields:
razorpay_order_id
string Order ID returned by Razorpay Orders API.
razorpay_payment_id
string Returned by Razorpay API only for successful payments.
razorpay_signature
string A hexadecimal string used for verifying the payment.
ACH payments progress through the following states:
- Created: Payment request has been initiated.
- Authorised: Payment has been accepted by Razorpay and submitted to the ACH network.
- Captured: Funds have been confirmed and will be settled to your account.
- Failed: Payment was rejected due to invalid account details, insufficient funds or other errors.
Payment Processing Timeline
Unlike card payments, ACH transactions are not processed in real-time. After successful payment creation:
- The payment status moves to
authorisedwithin seconds. - However, actual bank authorisation takes 1-4 business days.
- Settlement occurs on T+5 (5 business days after transaction).
- Most returns occur within the first 5 days if there are account issues.

Once the payment is completed by the customer, a POST request is made to the callback_url provided in the payment request. The data contained in this request will depend on whether the payment was a success or a failure.
If the payment made by the customer is successful, the following fields are sent:
razorpay_payment_idrazorpay_order_idrazorpay_signature
{"razorpay_payment_id": "pay_LUtJxInEqa0oAA&","razorpay_order_id": "order_LUtJ52zWwapfqs&","razorpay_signature": "e617a6c035cb39feb6cd16358d83a4e3d30b11d9e8e2181e6ef442da1d41df20"}
If the payment has failed, the callback will contain details of the error. Refer to
for details.Use Payments Rainy Day kit to overcome payments exceptions such as:
After receiving the razorpay_payment_id through the callback_url, use this endpoint to fetch the payment details:
Handy Tips
On the Razorpay Curlec Dashboard, ensure that the payment status is captured. Refer to the payment capture settings page to know how to
To verify the payment status from the Razorpay Curlec Dashboard:
- Log in to the Razorpay Curlec Dashboard and navigate to Transactions → Payments.
- Check if a Payment Id has been generated and note the status. In case of a successful payment, the status is marked as Captured.

Is this integration guide useful?