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.comRequest body
merchant_coderequiredYour merchant code
reference_norequiredOrder reference from initiate
amountrequiredDecimal string, 2 dp
currencyrequiredISO code, e.g. MYR
session_idrequiredFrom initiate (cs_…)
payment_channelrequirede.g. FPX, TNG, GRABPAY
bank_codeFor FPX, e.g. MBB
host_frontend_callback_urlrequiredCustomer redirect target
host_backend_callback_urlrequiredServer-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": "..." } }