Beneficiary Registration API

By registering beneficiary merchant through Payout API, it allows merchant to simply pass token (BeneficiaryID) without the need to fill in other beneficiary information in the subsequent payout request. Please note that while registering beneficiary to Payout API, we also verify voidability of beneficiary information through payout provider or bank.

πŸ‘

HTTPS POST / Server-to-Server

Beneficiary registration 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/beneficiary/register 
https://pgw.2c2p.com/payouts/api/v1.1/payout/beneficiary/register 
https://pgw.2c2p.com/payouts/api/v1.1/payout/beneficiary/register 

πŸ“˜

API Parameter

Beneficiary Registration Parameter
Beneficiary Registration Response / Notification Parameter

Prepare Request

  1. Prepare payload data.
  2. Encrypt payload data with JWT - HS256 algorithm using merchant secret key.
{
  "version": "1.1",
  "merchantID": "702702000000001",
  "requestID": "557f2de7-db81-40e9-9066-2821e7100a32",
  "IdCard": "",
  "accountName": "NGUYEN van a",
  "accountNo": "1023020330000",
  "bankCode": "AGRIBANK",
  "emailAddress": "[email protected]",
  "mobileNo": "",
  "companyId": "",
  "beneficiaryType": "",
  "beneficiaryTypeValue": "",
  "notificationUrl": "https://myweb.com/callback/notification" 
}

{
	"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoiMS4xIiwibWVyY2hhbnRJRCI6IjcwMjcwMjAwMDAwMDAwMSIsInJlcXVlc3RJRCI6IjU1N2YyZGU3LWRiODEtNDBlOS05MDY2LTI4MjFlNzEwMGEzMiIsIklkQ2FyZCI6IiIsImFjY291bnROYW1lIjoiTkdVWUVOIHZhbiBhIiwiYWNjb3VudE5vIjoiMTAyMzAyMDMzMDAwMCIsImJhbmtDb2RlIjoiQUdSSUJBTksiLCJlbWFpbEFkZHJlc3MiOiJwcmFzb25nQDJjMnAuY29tIiwibW9iaWxlTm8iOiIiLCJjb21wYW55SWQiOiIiLCJiZW5lZmljaWFyeVR5cGUiOiIiLCJiZW5lZmljaWFyeVR5cGVWYWx1ZSI6IiIsIm5vdGlmaWNhdGlvblVybCI6Imh0dHBzOi8vbXl3ZWIuY29tL2NhbGxiYWNrL25vdGlmaWNhdGlvbiJ9.R8Y2Zb6YMf9GgF1f1raTBa1Dm-WfegvCqvNZlZc-E6Y"
}
  1. Send request to beneficiary registration API.
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payouts/api/v1.1/payout/beneficiary/register' \
--header 'Content-Type: application/json' \
--data-raw '{
	"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoiMS4xIiwibWVyY2hhbnRJRCI6IjcwMjcwMjAwMDAwMDAwMSIsInJlcXVlc3RJRCI6IjU1N2YyZGU3LWRiODEtNDBlOS05MDY2LTI4MjFlNzEwMGEzMiIsIklkQ2FyZCI6IiIsImFjY291bnROYW1lIjoiTkdVWUVOIHZhbiBhIiwiYWNjb3VudE5vIjoiMTAyMzAyMDMzMDAwMCIsImJhbmtDb2RlIjoiQUdSSUJBTksiLCJlbWFpbEFkZHJlc3MiOiJwcmFzb25nQDJjMnAuY29tIiwibW9iaWxlTm8iOiIiLCJjb21wYW55SWQiOiIiLCJiZW5lZmljaWFyeVR5cGUiOiIiLCJiZW5lZmljaWFyeVR5cGVWYWx1ZSI6IiIsIm5vdGlmaWNhdGlvblVybCI6Imh0dHBzOi8vbXl3ZWIuY29tL2NhbGxiYWNrL25vdGlmaWNhdGlvbiJ9.R8Y2Zb6YMf9GgF1f1raTBa1Dm-WfegvCqvNZlZc-E6Y"
}'

Receive Response

  1. Receiving encrypted beneficiary data immediately.
  2. Decrypt payload data with JWT - HS256 algorithm using merchant secret key.
{
    "version": "1.1",
    "requestId": "591e6e59-dd19-4911-ae77-cf0043f4070b",
    "beneficiaryId": "payout_Prod_BFWW4eWRndEUmud88AQ_QHCw",
    "accountName": "NGUYEN Van A",
    "accountNo": "1023020330000",
    "emailAddress": "[email protected]",
    "mobileNo": "",
    "bankCode": "AGRIBANK",
    "merchantId": "702702000000001",
    "idCard": "",
    "comanyId": null,
    "beneficiaryType": "",
    "beneficiaryTypeValue": "",
    "notificationUrl": "https://merchantweb.com/notification/callback",
    "respCode": "8180",
    "respDesc": "Success – Payout beneficiary registration success",
    "remarks": null

}
{
	"payload": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoiMS4xIiwicmVxdWVzdElkIjoiNTkxZTZlNTktZGQxOS00OTExLWFlNzctY2YwMDQzZjQwNzBiIiwiYmVuZWZpY2lhcnlJZCI6InBheW91dF9Qcm9kX0JGV1c0ZVdSbmRFVW11ZDg4QVFfUUhDdyIsImFjY291bnROYW1lIjoiTkdVWUVOIFZhbiBBIiwiYWNjb3VudE5vIjoiMTAyMzAyMDMzMDAwMCIsImVtYWlsQWRkcmVzcyI6Im1lcmNoYW50QG1lcmNoYW50d2ViLmNvbSIsIm1vYmlsZU5vIjoiIiwiYmFua0NvZGUiOiJBR1JJQkFOSyIsIm1lcmNoYW50SWQiOiI3MDI3MDIwMDAwMDAwMDEiLCJpZENhcmQiOiIiLCJjb21hbnlJZCI6bnVsbCwiYmVuZWZpY2lhcnlUeXBlIjoiIiwiYmVuZWZpY2lhcnlUeXBlVmFsdWUiOiIiLCJub3RpZmljYXRpb25VcmwiOiJodHRwczovL21lcmNoYW50d2ViLmNvbS9ub3RpZmljYXRpb24vY2FsbGJhY2siLCJyZXNwQ29kZSI6IjgxODAiLCJyZXNwRGVzYyI6IlN1Y2Nlc3Mg4oCTIFBheW91dCBiZW5lZmljaWFyeSByZWdpc3RyYXRpb24gc3VjY2VzcyIsInJlbWFya3MiOm51bGx9.EyucZoQ08NBKUqluu53ZhUVDGJVspXgGIdyDQN5T9ig"
}