🇬🇧
Yativo Documentation
Spanish
English
English
  • Yativo
  • Introduction to Yativo
    • Financial Infrastructure
    • About Us
  • Dashboard
  • Business Plans
  • Getting Started with Yativo API
  • Yativo API Glossary
  • API reference
    • Misc.
      • Countries
      • States
      • City
  • Security and Authentication
    • Security
    • Authentication
    • Idempotency in API Requests
  • Environment
    • Environments
  • Notifications
    • Webhook
  • Compliance
    • Verification
      • KYC
      • KYB
      • KYC/KYB Update
      • KYC Status
      • Global Business Search
    • Supported Jurisdiction
    • Supported Countries, Currencies and Payment Method
  • User Management
    • Customer
      • Get Customers
      • Retrieve customer
      • Add Customer
  • Payments
    • Currencies
    • Crypto Wallets
      • Generate Wallet Address
      • Fetch Wallet Address
      • Crypto Deposit History
      • Single crypto deposit history
    • Payout
      • Payout
      • Get Payouts
      • Get Payout
      • Beneficiaries
        • Get Beneficiaries
        • Add Beneficiary Payment Details
        • Update Beneficiary
        • Archive Beneficiary
        • Add Beneficiary
    • Payin
    • Virtual Cards
      • Supported Currency, Country
      • Create card
      • Fetch card
      • Top up card
      • Get Transactions
      • Freeze and Unfreeze Card
    • Virtual Accounts
      • Create VIrtual Accounts
        • USD Virtual Account
        • Mexico Virtual Account
        • Brazil PIX QR
      • Virtual Account Management
      • Transaction History
  • Foreign Exchange
    • Exchange Rate
      • Request Quote
  • Transactions
    • Transaction Summary
    • Get Single Transaction
  • Crypto System
    • Yativo Crypto Platform API
Powered by GitBook
On this page
  1. Payments
  2. Payout
  3. Beneficiaries

Add Beneficiary

PreviousArchive BeneficiaryNextPayin

Last updated 2 months ago

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

Request Headers

  • Content-Type: application/json

  • Authorization: Bearer <your_token>

import requests
import json

url = "{{baseUrl}}/beneficiaries"
data = {
    "recipient_type": "individual",
    "customer_name": "John Smith",
    "customer_email": "john@yativo.com",
    "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())
$url = "{{baseUrl}}/beneficiaries";
$data = array(
    "recipient_type" => "individual",
    "customer_name" => "John Smith",
    "customer_email" => "john@yativo.com",
    "country" => "Nigeria",
    "customer_address" => array(
        "address_line_1" => "1st episode john doe street",
        "address_line_2" => "this can be null",
        "city" => "Ikeja",
        "county" => "Lagos",
        "postal_code" => 900901
    )
);
$data_json = json_encode($data);

$headers = array(
    'Content-Type: application/json',
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
);

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => $url,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $data_json,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => $headers
));

$response = curl_exec($curl);

if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
} else {
    echo $response;
}

curl_close($curl);
const url = "{{baseUrl}}/beneficiaries";
const data = {
    "recipient_type": "individual",
    "customer_name": "John Smith",
    "customer_email": "john@yativo.com",
    "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
    }
};

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
  },
  body: JSON.stringify(data)
};

fetch(url, options)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok ' + response.statusText);
    }
    return response.json();
  })
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
curl -X POST {{baseUrl}}/beneficiaries \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9" \
-d '{
    "recipient_type": "individual",
    "customer_name": "John Smith",
    "customer_email": "john@yativo.com",
    "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
    }
}'
Add beneficiary payment detail

ex-Add Beneficiary

post
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":"test@test.com","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":"john@yativo.com"},"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": "test@test.com",
    "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": "john@yativo.com"
    },
    "payment_object": {
      "bank_name": "Access bank",
      "bank_code": "044",
      "account_number": "0719841763",
      "account_name": "Yativo Smith"
    }
  }
}