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": "4b41db94-f59d-4ed5-a03c-5b8ac1796276",
"UTR": "0000001",
"payoutDate": "2020-12-31T00:00:00+07:00",
"amount": 1000.00,
"currency": "THB",
"beneficiaryName": "John Doe",
"beneficiaryBankName": "OCBC",
"beneficiaryBankCode": "OCBCSGSG",
"beneficiaryEmail": "[email protected]",
"bankReferenceNo": "CY0000408157",
"userDefined1": "",
"userDefined2": "",
"userDefined3": "",
"userDefined4": "",
"userDefined5": "",
"respCode": "8101",
"respDesc": "Success – Payout request accepted",
"remarks": "",
"preferredSofProfile": "GIP",
"beneficiaryId": "payout_Prod_BFiYJTXszLOkemhMz7uMHfBQ",
"beneficiaryType": "MOBILE",
"beneficiaryTypeValue": "+6581234567",
"preferredProvider": ""
}
{
"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoiMS4yIiwicmVxdWVzdElEIjoiNGI0MWRiOTQtZjU5ZC00ZWQ1LWEwM2MtNWI4YWMxNzk2Mjc2IiwiVVRSIjoiMDAwMDAwMSIsInBheW91dERhdGUiOiIzMS8xMi8yMDIwIiwiYW1vdW50IjoxMDAwLCJjdXJyZW5jeSI6IlRIQiIsImJlbmVmaWNpYXJ5TmFtZSI6IkpvaG4gRG9lIiwiYmVuZWZpY2lhcnlCYW5rTmFtZSI6Ik9DQkMiLCJiZW5lZmljaWFyeUJhbmtDb2RlIjoiT0NCQ1NHU0ciLCJiZW5lZmljaWFyeUVtYWlsIjoibmFtZUBlbWFpbC5jb20iLCJiYW5rUmVmZXJlbmNlTm8iOiJDWTAwMDA0MDgxNTciLCJ1c2VyRGVmaW5lZDEiOiIiLCJ1c2VyRGVmaW5lZDIiOiIiLCJ1c2VyRGVmaW5lZDMiOiIiLCJ1c2VyRGVmaW5lZDQiOiIiLCJ1c2VyRGVmaW5lZDUiOiIiLCJyZXNwQ29kZSI6IjgxMDEiLCJyZXNwRGVzYyI6IlN1Y2Nlc3Mg4oCTIFBheW91dCByZXF1ZXN0IGFjY2VwdGVkIiwicmVtYXJrcyI6IiIsInByZWZlcnJlZFNvZlByb2ZpbGUiOiJHSVAiLCJiZW5lZmljaWFyeUlkIjoicGF5b3V0X1Byb2RfQkZpWUpUWHN6TE9rZW1oTXo3dU1IZkJRIiwiYmVuZWZpY2lhcnlUeXBlIjoiTU9CSUxFIiwiYmVuZWZpY2lhcnlUeXBlVmFsdWUiOiIrNjU4MTIzNDU2NyIsInByZWZlcnJlZFByb3ZpZGVyIjoiIn0.RGmZ87DoiSEPaOzupTy1q34hoi55XJq-mAukxAfEWZE
}
Updated 3 months ago