Bulk Validate Beneficiary

The API validates the beneficiary details information (across multiple schemas). Upon receiving a beneficiary request, verify its validity and return any unsuccessful fields as issues in the response.

GET/payments/beneficiaries/validate

Body Parameters Request

NameTypeFormat / ValuesDescriptionRequired

items

array

object

List of items to validate

items[]

object

items[].entity_type

string

INDIVIDUAL, BUSINESS

The type of entity of the beneficiary

items[].bank_details

object

Set of attributes mapping to the beneficary bank details (as specified in the relevant schema)

Yes

items[].bank_details.account_country

string

/^[A-Z]{2,2}$/

The 2 letter ISO country code the beneficiary bank is located in

Yes

items[].bank_details.account_currency

string

/^[A-Z]{3,3}$/

The 3 letter ISO currency code the beneficiary bank accepts

Yes

items[].entity

object

Set of attributes mapping to the beneficary entity (as specified in the relevant schema)

Yes

Body Parameters Response

NameTypeFormat / ValuesDescription

valid

array

object

List of items that are valid

valid[]

object

Echo of the item sent in

valid[].entity_type

string

INDIVIDUAL, BUSINESS

The entity type this beneficiary was validated as

valid[].currency

string

/^[A-Z]{3}$/

The 3 letter ISO currency code used to validate this item

valid[].country

string

/^[A-Z]{2}$/

The 2 letter ISO country code used to validate this item

invalid

array

object

List of items that did not validate

invalid[]

object

Echo of the item sent in

invalid[].entity_type

string

INDIVIDUAL, BUSINESS

The entity type this beenficiary was validated as

invalid[].currency

string

/^[A-Z]{3}$/

The 3 letter ISO currency code used to validate this item

invalid[].country

string

/^[A-Z]{2}$/

The 2 letter ISO country code used to validate this item

invalid[].issues

array

object

an array of issues found in this item's payload

invalid[].issues[]

object

invalid[].issues[].field

string

The json path to the field that has the issue

invalid[].issues[].message

string

The issue encountered

totals

object

Aggregated totals of this validation

totals.valid

integer

number of items that have a valid payload

totals.count

integer

total number of items processes

totals.schemas

integer

total number of schemas used to validate

totals.invalid

integer

number of items that are invalid and have issues

Request Example

POST /payments/beneficiaries/validate
{
   "items": [
      {
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "account_number": "789456123012",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Anderson Emily"
         },
         "entity": {
            "individual_last_name": "Anderson",
            "address_country_subdivision": "TX",
            "individual_first_name": " Emily",
            "date_of_birth": "1985-06-05",
            "address_line_1": "1234 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "BANK OF AMERICA",
            "account_number": "234567890567",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Patel Jason"
         },
         "entity": {
            "individual_last_name": "Patel",
            "address_country_subdivision": "TX",
            "individual_first_name": " Jason",
            "date_of_birth": "1986-12-02",
            "address_line_1": "1235 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "Bank of America",
            "account_number": "654321098765",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Garcia Olivia"
         },
         "entity": {
            "individual_last_name": "Garcia",
            "address_country_subdivision": "TX",
            "individual_first_name": " Olivia",
            "date_of_birth": "1972-11-25",
            "address_line_1": "1236 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      }
   ]
}

Response Examples

{
   "totals": {
      "valid": 2,
      "count": 3,
      "schemas": 1,
      "invalid": 1
   },
   "valid": [
      {
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "BANK OF AMERICA",
            "account_number": "234567890567",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Patel Jason"
         },
         "entity": {
            "individual_last_name": "Patel",
            "address_country_subdivision": "TX",
            "individual_first_name": " Jason",
            "date_of_birth": "1986-12-02",
            "address_line_1": "1235 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US"
      },
      {
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "Bank of America",
            "account_number": "654321098765",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Garcia Olivia"
         },
         "entity": {
            "individual_last_name": "Garcia",
            "address_country_subdivision": "TX",
            "individual_first_name": " Olivia",
            "date_of_birth": "1972-11-25",
            "address_line_1": "1236 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US"
      }
   ],
   "invalid": [
      {
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "account_number": "789456123012",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Anderson Emily"
         },
         "entity": {
            "individual_last_name": "Anderson",
            "address_country_subdivision": "TX",
            "individual_first_name": " Emily",
            "date_of_birth": "1985-06-05",
            "address_line_1": "1234 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US",
         "issues": [
            {
               "field": "$.bank_details",
               "message": "Missing property bank_name"
            }
         ]
      }
   ]
}

Last updated

© All rights reserved to papaya global 2024