PayNow for API only
Last updated: June 4, 2025
To accept PayNow payments, you must follow these steps:
To send a payment request, call the Request a payment endpoint:
post
https://api.checkout.com/payments
1{2"source": {3"type": "PayNow"4},5"amount": 6540,6"currency": "SCB",7"reference": "ORD-5023-4E89",8"capture": true,9"success_url" : "abc.com/1234",10"cancel_url" : "abc.com/4567",11"failure_url" : "abc.com/2345",12"processing_channel_id": "pc_q4dbxom5jbgudnjzjpz7j2z6uq"13}
If you receive a 202 Accepted
response with a payment id
value and the status
field set to Pending
, your request was successful.
1{2"id": "pay_mbabizu24mvu3mela5njyhpit4",3"action_id": "act_mbabizu24mvu3mela5njyhpit4",4"amount": 6540,5"currency": "SGD",6"approved": true,7"status": "Pending",8"auth_code": "770687",9"response_code": "10000",10"response_summary": "Approved",11"source": {12"type": "PayNow",13"processed_on": "2019-09-10T10:11:12Z",14"reference": "ORD-5023-4E89"15},16"processing": {17"acquirer_transaction_id": "440644309099499894406",18"partner_status": "IN_PROGRESS"19},20"links": {21"self": {22"href": "https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4"23},24"redirect": {25"qr_code": {26"text": "MDAwMjAxMjY1NzAwMDlTRy5QQVlOT1cwMTAxMjAyMTIwMzEwMDgxMEJBQkMwMzAxMDA0MTQyMDI0MTIwNjAwMjgxMTUyMDQwMDAwNTMwMzcwMjU0MDQ0Ljg3NTgwMlNHNTkyM0NIRUNLT1VUIEFQQUMgUFRFLiBMVEQuNjAwOVNpbmdhcG9yZTYyMjAwMTE2cG5fNDE5MGVjMzU4NzlkNDYzMDRCNTYz"27}28}29}30}
- Take the URL from the
redirect.qr_code.text
field and convert it into a QR code using a third-party QR code generator tool. - Display the QR code to the customer.
- The customer must scan the QR code using their online banking app, and confirm the transaction.
Information
The QR code is valid for five minutes. The payment expires if the customer does not authorize the payment within this time frame.
Checkout.com communicates the capture of the payment using webhooks. When you receive a payment_captured
webhook notification, it indicates that the transaction has been successfully completed.
PayNow only supports auto-capture payments.
Information
You cannot void an auto-captured payment. To reverse a payment in progress, wait for the payment to be captured, and then process a refund.
To retrieve details about the payment, call the Get payment details endpoint, setting the payment_id
value from the payment response as the {id}
path parameter:
get
https://api.checkout.com/payments/{id}
See Get payment details for more information.
PayNow supports both partial and full refunds.
You can refund the payment through the Dashboard or by calling the Refund a payment endpoint, setting the payment_id
value from the payment response as the {id}
path parameter:
post
https://api.checkout.com/payments/{id}/refunds
1{2"amount": 203}
1{2"action_id": "act_c4x2vjvnx4uelb4io72fa4e57a",3"_links": {4"payment": {5"href": "https://api.checkout.com/payments/pay_fzzdurog3squjj2ityho7x3o64"6}7}8}
To simulate a successful payment, send a payment request to the sandbox environment as shown in the Request a payment section.
To simulate a rejected payment, send a payment request to the sandbox environment as shown in the Request a payment section, with the amount
field set to either 2200 or 3000:
1{2"source": {3"type": "PayNow"4},5"amount": 2200,6"currency": "SGD",7"reference": "ORD-5023-4E89",8"capture": true,9"processing_channel_id": "pc_q4dbxom5jbgudnjzjpz7j2z6uq"10}
1{2"id": "pay_buzuxrakld4uzewzchwgfjppy4",3"action_id": "act_bcoaluw3ydkepf2rmpszk23al4",4"amount": 2200,5"currency": "SGD",6"approved": false,7"status": "Declined",8"response_code": "20068",9"response_summary": "Internal error",10"risk": {11"flagged": false12},13"processed_on": "2025-04-29T10:13:39.3013079Z",14"_links": {15"self": {16"href": "https://gwc.ckotech.co/payments/pay_buzuxrakld4uzewzchwgfjppy4"17},18"actions": {19"href": "https://gwc.ckotech.co/gateway/payments/pay_buzuxrakld4uzewzchwgfjppy4/actions"20}21}22}
To simulate an expired payment, send a payment request to the sandbox environment as shown in the Request a payment section, with the amount
field set to either 4000:
To simulate a refund, send a refund request to the sandbox environment as shown in the Refund a payment section, with the amount
field set to:
- Any even number for a successful refund
- Any odd number for a rejected refund