Payout Inquiry API
HTTPS POST / Server-to-Server
Payment requests and responses are encrypted using JWT with HS256 algorithm (HMAC with SHA-256) using Merchant’s Secret Key.
Merchants must know how to prepare requests and process responses using JWT Token.
https://sandbox-pgw.2c2p.com/payouts/api/v1.2/payout/inquiry
https://pgw.2c2p.com/payouts/api/v1.2/payout/inquiry
https://pgw-id.2c2p.com/payouts/api/v1.2/payout/inquiry
API Parameter
Payout Inquiry Request Parameter
Payout Inquiry Response Parameter
Prepare Payout Request
- Prepare payload request data.
- Encrypt payload data with JWT with HS256 algorithm using merchant secret key.
{
"merchantID": "702702000000001",
"requestID": "1",
"UTR": "0000001"
}
{
"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElEIjoiNzAyNzAyMDAwMDAwMDAxIiwicmVxdWVzdElEIjoiMSIsIlVUUiI6IjAwMDAwMDEifQ.YSz4GcifpehJvfb0cQOkC06UIuUY05Ti3sHg8Um4svw"
}
- Send request to payout request API.
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payouts/api/v1.2/payout/inquiry' \
--header 'Content-Type: application/json' \
--data-raw '{
"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElEIjoiNzAyNzAyMDAwMDAwMDAxIiwicmVxdWVzdElEIjoiMSIsIlVUUiI6IjAwMDAwMDEifQ.YSz4GcifpehJvfb0cQOkC06UIuUY05Ti3sHg8Um4svw"
}'
Process Payout Response
- Receiving encrypted payout response data
- Decrypt payload data with JWT with HS256 algorithm using merchant secret key.
{
"version": "1.2",
"requestID": "1",
"UTR": "0000001",
"payoutDate": "2023-06-22T00:00:00+07:00",
"amount": 10.00,
"currency": "THB",
"beneficiaryName": "John Doe",
"beneficiaryType": "BANKACC",
"beneficiaryTypeValue": "77788888888888",
"preferredProvider": "",
"beneficiaryBankName": "OCBC",
"beneficiaryBankCode": "004",
"beneficiaryEmail": "[email protected]",
"bankReferenceNo": "CY0000408157",
"userDefined1": "",
"userDefined2": "",
"userDefined3": "",
"userDefined4": "",
"userDefined5": "",
"respCode": "8101",
"respDesc": "Success – Payout request accepted"
}
{
"payload": "eyJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoiMS4yIiwicmVxdWVzdElEIjoiMSIsIlVUUiI6IjAwMDAwMDEiLCJwYXlvdXREYXRlIjoiMjAyMy0wNi0yMlQwMDowMDowMCswNzowMCIsImFtb3VudCI6MTAsImN1cnJlbmN5IjoiVEhCIiwiYmVuZWZpY2lhcnlOYW1lIjoiSm9obiBEb2UiLCJiZW5lZmljaWFyeVR5cGUiOiJCQU5LQUNDIiwiYmVuZWZpY2lhcnlUeXBlVmFsdWUiOiI3Nzc4ODg4ODg4ODg4OCIsInByZWZlcnJlZFByb3ZpZGVyIjoiIiwiYmVuZWZpY2lhcnlCYW5rTmFtZSI6Ik9DQkMiLCJiZW5lZmljaWFyeUJhbmtDb2RlIjoiMDA0IiwiYmVuZWZpY2lhcnlFbWFpbCI6Im5hbWVAZW1haWwuY29tIiwiYmFua1JlZmVyZW5jZU5vIjoiQ1kwMDAwNDA4MTU3IiwidXNlckRlZmluZWQxIjoiIiwidXNlckRlZmluZWQyIjoiIiwidXNlckRlZmluZWQzIjoiIiwidXNlckRlZmluZWQ0IjoiIiwidXNlckRlZmluZWQ1IjoiIiwicmVzcENvZGUiOiI4MTAxIiwicmVzcERlc2MiOiJTdWNjZXNzIOKAkyBQYXlvdXQgcmVxdWVzdCBhY2NlcHRlZCJ9.7UfBEgRhCLr3AC8VgMMTZwW5-wAy79UiOGwJ5p_yyN4"
}
Updated over 1 year ago