DocsEndpoints

Submit a payment

Submits the customer's chosen channel for a session. This is normally called by the hosted Syok2Pay checkout, not directly by merchants — it is documented here for completeness.

POSThttps://pay.syok2pay-sandbox.com/v1/payment
Base URL
https://pay.syok2pay-sandbox.com

Request body

merchant_coderequired
string

Your merchant code

reference_norequired
string

Order reference from initiate

amountrequired
string

Decimal string, 2 dp

currencyrequired
string

ISO code, e.g. MYR

session_idrequired
string

From initiate (cs_…)

payment_channelrequired
string

e.g. FPX, TNG, GRABPAY

bank_code
string

For FPX, e.g. MBB

host_frontend_callback_urlrequired
string

Customer redirect target

host_backend_callback_urlrequired
string

Server-to-server callback

Response

This endpoint does not return a JSON body on success. The gateway responds with an HTTP 302 redirect whose Location header points to the selected bank or payment provider — the customer's browser follows it to complete payment.

http
HTTP/1.1 302 Found
Location: https://bank.example/fpx/redirect?token=...

On failure, the gateway either redirects back to the hosted pay page with an error query parameter, or (for direct/JSON callers) returns a JSON error:

json
{ "success": false, "error": { "code": "PAYMENT_FAILED", "message": "..." } }