🇬🇧
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 Payment Details

PreviousGet BeneficiariesNextUpdate Beneficiary

Last updated 2 months ago

To add Payment details to a beneficiary:

STEP 1

Make a GET {{baseUrl}}/beneficiary/form/show/{{gatewayID}}to get the Dynamic Form (The form response is different for each gateway) for adding the beneficiary details

Request

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN

  • Content-Type: application/json

Request Example

import requests

gateway_id = "331" // example gateway ID
url = f"{{baseUrl}}/beneficiary/form/show/{gateway_id}"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

response = requests.get(url, headers=headers)
print(response.json())
<?php

$gateway_id = "331"; // example gateway ID
$url = "{{baseUrl}}/beneficiary/form/show/" . $gateway_id;
$headers = array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN"
);

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => $url,
    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 gateway_id = "331"; //example gateway ID
const url = `{{baseUrl}}/beneficiary/form/show/${gateway_id}`;

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  }
};

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 GET "{{baseUrl}}/beneficiary/form/show/331" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example response of the Dynamic Form

{
    "nickname": "John Doe Vitawallet",
    "gateway_id": 331,
    "currency": "USD",
    "beneficiary_id": 17,
    "payment_data": {
        "beneficiary_type": "",
        "beneficiary_first_name": "",
        "beneficiary_last_name": "",
        "company_name": "",
        "beneficiary_email": "",
        "state": "",
        "city": "",
        "beneficiary_address": "",
        "zipcode": "",
        "beneficiary_document_type": "",
        "beneficiary_document_number": "",
        "account_type_bank": "",
        "account_bank": "",
        "routing_number": "",
        "purpose": "",
        "purpose_comentary": ""
    }
}

STEP 2

Make a post request using the filled dynamic form as body

POST {{baseUrl}}/beneficiaries/payment-methods/

Request

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN

  • Content-Type: application/json

Request Example

NOTE: This body example matches the retrieved dynamic form from Gateway ID 331 in the above example

{
    "nickname": "John Doe Vitawallet",
    "gateway_id": 331,
    "currency": "USD",
    "beneficiary_id": 17,
    "payment_data": {
        "beneficiary_type": "Individual",
        "beneficiary_first_name": "John",
        "beneficiary_last_name": "Doe",
        "company_name": "Zee Technologies",
        "beneficiary_email": "john.doe@example.com",
        "state": "California",
        "city": "Los Angeles",
        "beneficiary_address": "123 Main St",
        "zipcode": "90001",
        "beneficiary_document_type": "DNI",
        "beneficiary_document_number": "12345678",
        "account_type_bank": "Checking",
        "account_bank": "1234567890123456",
        "routing_number": "987654321",
        "purpose": "ISGDDS",
        "purpose_comentary": "For business purposes"
    }
}

Example Request

import requests
import json

url = "https://api.yourservice.com/beneficiaries/payment-methods/"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "nickname": "John Doe Vitawallet",
    "gateway_id": 331,
    "currency": "USD",
    "beneficiary_id": 17,
    "payment_data": {
        "beneficiary_type": "Individual",
        "beneficiary_first_name": "John",
        "beneficiary_last_name": "Doe",
        "company_name": "Zee Technologies",
        "beneficiary_email": "john.doe@example.com",
        "state": "California",
        "city": "Los Angeles",
        "beneficiary_address": "123 Main St",
        "zipcode": "90001",
        "beneficiary_document_type": "DNI",
        "beneficiary_document_number": "12345678",
        "account_type_bank": "Checking",
        "account_bank": "1234567890123456",
        "routing_number": "987654321",
        "purpose": "ISGDDS",
        "purpose_comentary": "For business purposes"
    }
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
<?php

$url = `{{baseUrl}}/beneficiaries/payment-methods/`;
$headers = array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "Content-Type: application/json"
);
$data = json_encode(array(
    "nickname" => "John Doe Vitawallet",
    "gateway_id" => 331,
    "currency" => "USD",
    "beneficiary_id" => 17,
    "payment_data" => array(
        "beneficiary_type" => "Individual",
        "beneficiary_first_name" => "John",
        "beneficiary_last_name" => "Doe",
        "company_name" => "Zee Technologies",
        "beneficiary_email" => "john.doe@example.com",
        "state" => "California",
        "city" => "Los Angeles",
        "beneficiary_address" => "123 Main St",
        "zipcode" => "90001",
        "beneficiary_document_type" => "DNI",
        "beneficiary_document_number" => "12345678",
        "account_type_bank" => "Checking",
        "account_bank" => "1234567890123456",
        "routing_number" => "987654321",
        "purpose" => "ISGDDS",
        "purpose_comentary" => "For business purposes"
    )
));

$curl = curl_init();

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

$response = curl_exec($curl);

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

curl_close($curl);
?>
const url = `{{baseUrl}}/beneficiaries/payment-methods/`

const data = {
    nickname: "John Doe Vitawallet",
    gateway_id: 331,
    currency: "USD",
    beneficiary_id: 17,
    payment_data: {
        beneficiary_type: "Individual",
        beneficiary_first_name: "John",
        beneficiary_last_name: "Doe",
        company_name: "Zee Technologies",
        beneficiary_email: "john.doe@example.com",
        state: "California",
        city: "Los Angeles",
        beneficiary_address: "123 Main St",
        zipcode: "90001",
        beneficiary_document_type: "DNI",
        beneficiary_document_number: "12345678",
        account_type_bank: "Checking",
        account_bank: "1234567890123456",
        routing_number: "987654321",
        purpose: "ISGDDS",
        purpose_comentary: "For business purposes"
    }
};

fetch(url, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "{{baseUrl}}/beneficiaries/payment-methods/" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
           "nickname": "John Doe Vitawallet",
           "gateway_id": 331,
           "currency": "USD",
           "beneficiary_id": 17,
           "payment_data": {
               "beneficiary_type": "Individual",
               "beneficiary_first_name": "John",
               "beneficiary_last_name": "Doe",
               "company_name": "Zee Technologies",
               "beneficiary_email": "john.doe@example.com",
               "state": "California",
               "city": "Los Angeles",
               "beneficiary_address": "123 Main St",
               "zipcode": "90001",
               "beneficiary_document_type": "DNI",
               "beneficiary_document_number": "12345678",
               "account_type_bank": "Checking",
               "account_bank": "1234567890123456",
               "routing_number": "987654321",
               "purpose": "ISGDDS",
               "purpose_comentary": "For business purposes"
           }
         }'

this form Requires the Beneficiary ID (gotten in the response when you or ) to bind the payment details to the Beneficiary

Add Beneficiary
Get Beneficiaries

Get Currency Requirements

get
Authorizations
Responses
200Success
get
GET /api/v1/beneficiary/form/show/332 HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success

No content

  • STEP 1
  • GETGet Currency Requirements
  • STEP 2
  • POSTAdd Payment Details

Add Payment Details

post

Endpoint Description

This POST request is used to create payment methods for beneficiaries.

Response

The response for this request follows the JSON schema below:

{
    "type": "object",
    "properties": {
        "status": {
            "type": "string"
        },
        "status_code": {
            "type": "integer"
        },
        "message": {
            "type": "string"
        },
        "data": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string"
                }
            }
        }
    }
}

With a unique flow for all methods as below

{
    "gateway_id": int,
    "nickname": string,
    "beneficiary_id": int,
    "address": {
        "street": string,
        "houseNumber": string,
        "additionalInfo": string,
        "city": "string",
        "province": "string",
        "zipCode": string
    },
    "payment_data": {
        ...
    }
}
Authorizations
Body
all ofOptional
and
anyOptionalExample: {"gateway_id":333,"nickname":"Bridge payment sample EUR","currency":"EUR","payment_data":{"account_number":"FR2213127390004078439692S06","account_name":"Joanne Smith","routing_number":"SWIFT42345","account_type":"iban","address":{"line1":"456 Market Ave","line2":"","city":"Paris","state":"ÃŽle-de-France","postal_code":"75001","country":"FR"},"iban_account_number":"FR2213127390004078439692S06","iban_bic":"BNPAFRPP","iban_country":"FR","account_owner_type":"individual","first_name":"Joanne","last_name":"Smith"},"customer_id":"ae68f0ef-0e59-4a23-b8da-9e07bf2af361"}
Responses
200
OK
application/json
Responseall of
and
anyOptionalExample: {"status":"success","status_code":200,"message":"Request successful","data":{"message":"Payment data processed successfully"}}
401
Unauthorized
application/json
post
POST /api/v1/beneficiaries/payment-methods HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 568

{
  "gateway_id": 333,
  "nickname": "Bridge payment sample EUR",
  "currency": "EUR",
  "payment_data": {
    "account_number": "FR2213127390004078439692S06",
    "account_name": "Joanne Smith",
    "routing_number": "SWIFT42345",
    "account_type": "iban",
    "address": {
      "line1": "456 Market Ave",
      "line2": "",
      "city": "Paris",
      "state": "ÃŽle-de-France",
      "postal_code": "75001",
      "country": "FR"
    },
    "iban_account_number": "FR2213127390004078439692S06",
    "iban_bic": "BNPAFRPP",
    "iban_country": "FR",
    "account_owner_type": "individual",
    "first_name": "Joanne",
    "last_name": "Smith"
  },
  "customer_id": "ae68f0ef-0e59-4a23-b8da-9e07bf2af361"
}
{
  "status": "success",
  "status_code": 200,
  "message": "Request successful",
  "data": {
    "message": "Payment data processed successfully"
  }
}