Skip to main content
Available in🇲🇾 Malaysia
DuitNow Pay lets your customers pay from their Malaysian bank account. With the S2S integration, your server creates the payment with the customer’s bank, and you redirect the customer to the URL Razorpay Curlec returns. The customer approves the payment on their bank’s page and comes back to your callback URL.

Prerequisites

  • S2S integration and DuitNow Pay are enabled on your account. Razorpay Curlec does not enable S2S by default. DuitNow Pay is in early access, and your business must be registered with PayNet; Razorpay Curlec does this for you. Contact your account manager to enable both.
  • You have live API keys. DuitNow Pay is not available in test mode. Test with a live RM 1.00 payment.
  • You have set up webhooks for payment.captured and payment.failed (recommended).

Integration Steps

Follow the steps below to integrate the Razorpay Curlec S2S JSON API and accept payments using DuitNow Pay. 1.1 Get the List of Banks 1.2 Create an Order 1.3 Create a Payment 1.4 Redirect the Customer to Their Bank 1.5 Handle the Callback 1.6 Fetch Payment Details and Verify Payment Status

1.1 Get the List of Banks

Your customer must pick their bank on your page before you create the payment. Pass the bank’s code in the bank field. Banks active for DuitNow Pay at Razorpay Curlec:
Handy Tips
  • The list of banks may change. Unlike FPX, the Methods API does not return DuitNow Pay banks yet.
  • Some of these codes are also FPX bank codes. For DuitNow Pay, always send them with the method duitnow.

1.2 Create an Order

To process a payment, create a Razorpay Curlec Order to correspond with the order in your system. Create an order in MYR for every payment. The amount is in sen: minimum 100 (RM 1.00), maximum 5000000 (RM 50,000). Order is an important step in the payment process.
  • An order should be created for every payment.
  • You can create an order using the Orders API. It is a server-side API call. Know how to authenticate Orders API.
  • The order_id received in the response should be passed in the payment request. 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.

API Sample Code

Use this endpoint to create an order using the Orders API. POST /orders
Success Response
amount mandatory : integer Payment amount in sen. For example, for RM 100.00, enter 10000. Minimum 100 (RM 1.00), maximum 5000000 (RM 50,000).currency mandatory : string Must be MYR.receipt optional : string Your receipt id for this order. Maximum length is 40 characters.notes optional : json object Key-value pairs to store additional information about the order. Maximum 15 key-value pairs, 256 characters (maximum) each.Know more about Orders API.
Descriptions for the response parameters are present in the Orders Entity parameters table.

1.3 Create a Payment

Once an order is created, create a payment with duitnow as the method, duitnow.flow as online_banking and the customer’s bank code. POST /payments/create/json

Request Parameters

amount mandatory : integer Amount in sen. Must match the order amount. Minimum 100 (RM 1.00), maximum 5000000 (RM 50,000). currency mandatory : string Must be MYR. order_id mandatory : string The order ID from step 1.2. email mandatory : string Customer’s email address. contact mandatory : string Customer’s phone number with country code. For example, +60123456789. method mandatory : string Must be duitnow. duitnow mandatory : object DuitNow details. flow mandatory : string Must be online_banking. bank mandatory : string Code of the customer’s bank, from step 1.1. callback_url mandatory : string Where Razorpay Curlec sends the customer, and the payment result, after the bank. notes optional : object Key-value pairs to store additional information. Maximum 15 key-value pairs.

Response Parameters

razorpay_payment_id : string Unique identifier of the payment. Store it to track the payment. next : array One action object. action : string Always redirect for DuitNow Pay. url : string Send the customer’s browser to this URL. It opens the page of the bank in the request.

Request Errors

These requests are rejected:

1.4 Redirect the Customer to Their Bank

Redirect the customer’s browser to next[].url straight away. The customer logs in to their bank and approves the payment.
Watch Out!Do not open the URL in a hidden frame or an iframe. Some banks block this.

1.5 Handle the Callback

After the bank, Razorpay Curlec sends the customer back to your callback_url with a form-encoded POST request.

Success Callback

If the payment is successful, the following fields are sent:
  • razorpay_payment_id
  • razorpay_order_id
  • razorpay_signature
Callback Example
Verify the signature with your key secret, as for any other payment.

Failure Callback

If the payment fails, the callback contains error fields and no signature. Refer to Errors for details.
Watch Out!Never fulfil an order from the callback alone. Confirm the payment with a webhook or by fetching the payment, as explained in step 1.6.

1.6 Fetch Payment Details and Verify Payment Status

Subscribe to the payment.captured and payment.failed webhooks. You also receive payment.authorized and order.paid. Each carries the method duitnow, duitnow.flow as online_banking and the bank code. Validate the X-Razorpay-Signature header on each webhook. The same event can be delivered more than once, so fulfil each order only once, for example by checking the payment ID before you fulfil. Then fetch the payment with your API keys before you fulfil the order:
Fulfil the order only when status is captured and the amount and order_id match.
Handy TipsOn the Razorpay Curlec Dashboard, ensure that the payment status is captured. Refer to the payment capture settings page to know how to capture payments automatically.

Refunds

You can refund a DuitNow Pay payment in full or in part, the same as any other payment, using the Refunds API (POST /v1/payments/{id}/refund). During early access, Razorpay Curlec pays the customer by bank transfer within 5 to 7 working days, and the refund then shows as processed. Do not also refund the customer yourself.

Frequently Asked Questions (FAQs)

Not yet. Use the bank codes in step 1.1.
Yes. Razorpay Curlec sends the customer and the payment result to it after the bank.
No. Make a live RM 1.00 payment.
No. DuitNow Pay does not involve card data.

Next Steps

DuitNow Pay is not available in test mode, so skip Step 2: Test Integration for this method. Make a live RM 1.00 payment, then complete the Go-live Checklist.
Last modified on November 17, 2026