Payout Inquiry

πŸ‘

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.1/payout/inquiry
https://pgw.2c2p.com/payouts/api/v1.1/payout/inquiry
https://payid.2c2p.com/payouts/api/v1.1/payout/inquiry

πŸ“˜

API Parameter

Payout Inquiry Request Parameter
Payout Inquiry Response Parameter

Prepare Payout Request

  1. Prepare payload request data.
  2. Encrypt payload data with JWT with HS256 algorithm using merchant secret key.
{
    "merchantID": "702702000000001",
    "requestID": "1",
    "UTR": "0000001"
}
{
    "payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElEIjoiNzAyNzAyMDAwMDAwMDAxIiwicmVxdWVzdElEIjoiMSIsIlVUUiI6IjAwMDAwMDEifQ.YSz4GcifpehJvfb0cQOkC06UIuUY05Ti3sHg8Um4svw"
}
  1. Send request to payout request API.
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payouts/api/v1.1/payout/inquiry' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElEIjoiNzAyNzAyMDAwMDAwMDAxIiwicmVxdWVzdElEIjoiMSIsIlVUUiI6IjAwMDAwMDEifQ.YSz4GcifpehJvfb0cQOkC06UIuUY05Ti3sHg8Um4svw"
}'

Process Payout Response

  1. Receiving encrypted payout response data
  2. Decrypt payload data with JWT with HS256 algorithm using merchant secret key.
{
    "version": "1.1",
    "requestId": "1",
    "UTR": "0000001",
    "payoutDate": "31/12/2020",
    "amount": 1000.00,
    "currency": "THB",
    "beneficiaryName": "John Doe",
    "beneficiaryAccountNo": "1234567890",
    "beneficiaryBankName": "OCBC",
    "beneficiaryBankCode": "OCBCSGSG",
    "beneficiaryMobileNo": "+6581234567",
    "beneficiaryEmail": "[email protected]",
    "idCard": "201201200551",
    "bankReferenceNo": "CY0000408157",
    "userDefined1": "",
    "userDefined2": "",
    "userDefined3": "",
    "userDefined4": "",
    "userDefined5": "",
    "respCode": "8100",
    "respDesc": "Success – Payout disbursement success"
}
{
    "payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoiMS4xIiwicmVxdWVzdElkIjoiMSIsIlVUUiI6IjAwMDAwMDEiLCJwYXlvdXREYXRlIjoiMzEvMTIvMjAyMCIsImFtb3VudCI6MTAwMCwiY3VycmVuY3kiOiJUSEIiLCJiZW5lZmljaWFyeU5hbWUiOiJKb2huIERvZSIsImJlbmVmaWNpYXJ5QWNjb3VudE5vIjoiMTIzNDU2Nzg5MCIsImJlbmVmaWNpYXJ5QmFua05hbWUiOiJPQ0JDIiwiYmVuZWZpY2lhcnlCYW5rQ29kZSI6Ik9DQkNTR1NHIiwiYmVuZWZpY2lhcnlNb2JpbGVObyI6Iis2NTgxMjM0NTY3IiwiYmVuZWZpY2lhcnlFbWFpbCI6Im5hbWVAZW1haWwuY29tIiwiaWRDYXJkIjoiMjAxMjAxMjAwNTUxIiwiYmFua1JlZmVyZW5jZU5vIjoiQ1kwMDAwNDA4MTU3IiwidXNlckRlZmluZWQxIjoiIiwidXNlckRlZmluZWQyIjoiIiwidXNlckRlZmluZWQzIjoiIiwidXNlckRlZmluZWQ0IjoiIiwidXNlckRlZmluZWQ1IjoiIiwicmVzcENvZGUiOiI4MTAwIiwicmVzcERlc2MiOiJTdWNjZXNzIOKAkyBQYXlvdXQgZGlzYnVyc2VtZW50IHN1Y2Nlc3MifQ.ShoQ-7Bn8E6KYZAcRk5VhFzpF64nBnvq4ZINcozxUzs"
}