Add Beneficiary
Description
This endpoint POST
{{baseUrl}}/beneficiaries
allows you to add a new beneficiary. The request requires a bearer token for authentication.
Note: To Add Payment details to the Beneficiary see Add beneficiary payment detail
Request Headers
Content-Type: application/json
Authorization: Bearer <your_token>
Authorizations
Body
all ofOptional
and
anyOptionalExample:
{"mode":"monnet","nickname":"Monnet Mexico (Clave successful)","currency":"MXN","description":"Payout sample object for Mexico (Clave)","address":{"street":"Mexico","houseNumber":"966","additionalInfo":"Payout sample object for Mexico (Clave)","city":"CABA","province":"Lima","zipCode":"1408"},"beneficiary":{"name":"Sergio","lastName":"test","email":"[email protected]","document":{"type":1,"number":"33446836"}},"destination":{"bankAccount":{"bankCode":"002","clave":"646180110400000007","accountType":1}}}
Responses
200
OK
application/json
Responseall of
and
anyOptionalExample:
{"status":"success","status_code":200,"message":"Request successful","data":{"user_id":2,"nickname":"John Doe Zenith bank","mode":"unknown","currency":"NGN","address":{"city":"Lugbe","state":"FCT - Abuja","country":"Nigeria","postal_code":"900709"},"beneficiary":{"name":"Yativo Smith","email":"[email protected]"},"payment_object":{"bank_name":"Access bank","bank_code":"044","account_number":"0719841763","account_name":"Yativo Smith"}}}
post
POST /api/v1/beneficiaries HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 504
{
"mode": "monnet",
"nickname": "Monnet Mexico (Clave successful)",
"currency": "MXN",
"description": "Payout sample object for Mexico (Clave)",
"address": {
"street": "Mexico",
"houseNumber": "966",
"additionalInfo": "Payout sample object for Mexico (Clave)",
"city": "CABA",
"province": "Lima",
"zipCode": "1408"
},
"beneficiary": {
"name": "Sergio",
"lastName": "test",
"email": "[email protected]",
"document": {
"type": 1,
"number": "33446836"
}
},
"destination": {
"bankAccount": {
"bankCode": "002",
"clave": "646180110400000007",
"accountType": 1
}
}
}
200
OK
{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"user_id": 2,
"nickname": "John Doe Zenith bank",
"mode": "unknown",
"currency": "NGN",
"address": {
"city": "Lugbe",
"state": "FCT - Abuja",
"country": "Nigeria",
"postal_code": "900709"
},
"beneficiary": {
"name": "Yativo Smith",
"email": "[email protected]"
},
"payment_object": {
"bank_name": "Access bank",
"bank_code": "044",
"account_number": "0719841763",
"account_name": "Yativo Smith"
}
}
}
import requests
import json
url = "{{baseUrl}}/beneficiaries"
data = {
"recipient_type": "individual",
"customer_name": "John Smith",
"customer_email": "[email protected]",
"country": "Nigeria",
"customer_address": {
"address_line_1": "1st episode john doe street",
"address_line_2": "this can be null",
"city": "Ikeja",
"county": "Lagos",
"postal_code": 900901
}
}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Last updated