Create a payment intent
Create a payment intent. Idempotent on the merchant reference: a repeat POST with the same `merchant_reference` returns the original intent rather than creating a duplicate. The key's environment stamps the intent; there is no body or query override.
Create a payment intent. Idempotent on the merchant reference: a repeat POST with the same merchant_reference returns the original intent rather than creating a duplicate. The key's environment stamps the intent; there is no body or query override.
Authorization
apiKey Merchant API key pair. Send as Authorization: Basic base64(publicKey:secretKey) — username is the public key (pk_live_… / pk_test_…), password is the secret key (sk_live_… / sk_test_…). The public key prefix determines the environment of every order created by the request — there is no body, query, or header override.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/payment_intents" \ -H "Content-Type: application/json" \ -d '{ "amount": "10000", "country": "MY", "currency": "MYR", "customer": {}, "merchant_reference": "order-2026-05-09-0001" }'{
"amount": "10000",
"country": "MY",
"created_at": "2026-05-09T12:34:00.000Z",
"currency": "MYR",
"environment": "test",
"failure_code": null,
"failure_message": null,
"id": "dord_01HZYABCDXYZ",
"merchant_reference": "order-2026-05-09-0001",
"next_action": {
"expires_at": "2026-05-09T12:49:00.000Z",
"type": "redirect_to_url",
"url": "https://checkout.example/pay/dord_01HZYABCDXYZ"
},
"object": "payment_intent",
"payment_method": "FPX",
"status": "requires_action",
"updated_at": "2026-05-09T12:34:02.000Z"
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}{
"error": {
"code": "validation_failed",
"message": "Currency XYZ is not enabled for this merchant."
}
}Get a payment intent GET
Fetch a payment intent by id. Scoped to the authenticating merchant and the key's stamped environment; intents that belong to another merchant or environment return 404 indistinguishably from unknown ids.
List payment method options GET
Return the payment methods enabled for the authenticating merchant in the API key's environment. Method codes are the public platform enum; provider-local codes stay internal.