Create a payment

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Dynamic PayNow QR

Dynamic PayNow QR allows you to create unique PayNow QR codes for each and every transaction. Upon getting the response, you will need to convert the base64 string to an image and display it to your customer.

There will be 2 callbacks fired:

  1. Payment completion by customer
  2. Crediting of funds to your account

For more information on PayNow, head over to PayNow QR.

Dynamic Virtual Account

Dynamic Virtual Account (VA) allows you to create unique VAs for each and every transaction. You can tie your transactionID with a VA, e.g. txnID123 <> VA123.

If a transaction (e.g. txnID123) is Paid or Expired, subsequent transfers to the Virtual Account (e.g. VA123) will not be associated. These subsequent transfers will be refunded to the user to the originating bank account.

ParameterRequired?TypeDescription
AmountMandatoryFloat (up to 2decimal places)Transaction Amount that user is required to pay/transfer.
referenceIdMandatoryStringThis is used for idempotency and should typically be a "transaction id" or "order id" on your platform.
DescriptionOptionalStringAn arbitrary string attached to the object.
paymentMethodTypeMandatoryStringMust always be "virtual_bank_account"
bankShortCodeMandatoryStringSupported values: "cimb"
expiredAtMandatoryStringTimestamp to be in Time.iso8601.
Expiry limit within 1hour to 30days

Example of Dynamic VA request

# POST api/v4/payments/
# FYI, passing in metadata is possible,
# "description": "{\"key\":\"abc\",\"key2\":\"another key\"}"  
  
Basic Auth
{
    "data": {
        "relationships": {
            "customerProfile": {
                "data": {
                    "id": "customer_profile_ff9a2945-5f58-4cd3-ac6e-90ee4361bf1e"
                }
            }
        },
        "attributes": {
            "amount": 101.0,
            "referenceId": "ORDER_0322",
            "description": "This is the first order",
            "paymentMethodType": "virtual_bank_account",
            "paymentMethodOptions": {
                "bankShortCode": "cimb"
            },
            "expiredAt": "2023-06-20T17:48:42+07:00"
        }
    }
}

Example of Dynamic VA response

{
    "data": {
        "id": "contract_ab8ad04b27d0414a96ae0b30a82576c8",
        "type": "payment",
        "attributes": {
            "status": "pending",
            "amount": "101.0",
            "createdAt": "2022-09-06T16:52:11+08:00",
            "description": "This is the first order",
            "expiredAt": "2023-06-20T17:48:42+07:00",
            "referenceId": "ORDER_0322",
            "fees": "0.0",
            "paymentMethod": {
                "id": "va_756d9f1e6c3f7c1417c3eed133e0ab4d",
                "type": "virtual_bank_account",
                "referenceId": "ORDER_0322",
                "instructions": {
                    "bankShortCode": "CIMB",
                    "accountNo": "8435212389019"
                }
            }
        }
    }
}
Body Params
string
required
Defaults to virtual_bank_account

The type of payment method. Accepts "paynow" or "virtual_bank_account"

string
required
Defaults to 99.9

Invoice amount

string
required
Defaults to customer_id_123456

Your internal reference ID. Examples: customer ID; invoice ID. Please note that it has to be unique for each request.

string
Defaults to (blank)

If left blank, there is a default expiry of 300s after the QR code is generated. Date format is based on ISO 8601 (e.g. 2020-12-03T20:03:53+07:00). Expiry limit within 1hour to 30days

string
Defaults to customer_profile_bf72e369-fc3d-4cde-9e4e-5713db9577f3

CustomerProfile id (retrieved from response of CustomerProfile API). Only for merchants in high-risk industries. Refer to the "Customer Profile" section.

string
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json