Create Recipient
Overview
This endpoint creates a new Recipient for a specific Customer by registering a payment key in the Visionamos - Passport Bre-B Node. Recipients represent destination accounts or keys (such as email, phone, alphanumeric, national ID, or business code) used when initiating payments.
Endpoint Details
Definition | Description |
---|---|
Endpoint | https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/recipients/breb |
Method | POST |
Headers | Content-Type: application/json, Authorization |
Authentication | Access Token (Bearer Token) |
Request Body
Parameter | Type | Constraints | Required | Description |
---|---|---|---|---|
entity_customer_id | String | UUID | Yes | The unique identifier of the entity customer creating the recipient. |
key_type | String | ENUM: NRIC , M , E , O , B | Yes | Type of key. Accepted values:
|
key_value | String | Varies by key_type | Yes | The value of the recipient’s key. |
Example Request
curl --location 'https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/breb/recipients' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data-raw '{
"entity_customer_id": "cde52c0b-029e-47a7-b6fe-58996680611f",
"key_type": "E",
"key_value": "jimmyjohns8@test.com"
}'
Ensure that the provided entity_customer_id
and recipient information are valid before making the request.
Response Body
- HTTP Status Code: 200 OK.
- The response will contain the recipient details along with its unique identifier.
Example of Response
{
"id": "8e5dbe27-b17e-4366-a116-82f9c52bcdab",
"entity_customer_id": "cde52c0b-029e-47a7-b6fe-58996680611f",
"key_type": "E",
"key_value": "jimmyjohns8@test.com"
}
The response confirms the recipient has been successfully created and returns a unique recipient id
for future transactions.
Common Errors and Handling
HTTP Status Code | Meaning | Description |
---|---|---|
400 Bad Request | Invalid Data | Required fields are missing or contain incorrect values. |
401 Unauthorized | Expired Token | The access token is invalid or has expired. |
403 Forbidden | Access Denied | The request is not authorized to create a recipient. |
500 Internal Server Error | Server Error | An unexpected error occurred while creating the recipient. |
Best Practices
- Ensure the
entity_customer_id
is correct and associated with a valid entity customer. - Validate the recipient’s
key_type
andkey_value
before making the request.