Add Beneficiary Payment Details

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

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

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())

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/

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

Request

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN

  • Content-Type: application/json

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"}}
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"
  }
}

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": "[email protected]",
        "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": "[email protected]",
        "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())

Last updated