Custom fields

The response body fields necessary for building user-facing forms to collect recipient information (and, subsequently, to POST recipient and recipient-account data to ReadyRemit) can vary depending on the country, currency, transfer method, and recipient type. For example, the fields necessary to define a recipient with a bank account in India (Indian Rupee) differ from those necessary to define a recipient in the Philippines (Philippine Peso) expecting a cash remittance:

To accommodate, ReadyRemit provides two operations, Get Recipient Fields and Get Recipient Account Fields, that return response bodies containing sets of field definitions over which client applications iterate to build user-facing forms. Here is an example:

Fields can then be posted back to the API to create Recipients and Recipient Accounts. Each field type has a specific format it needs to be submitted in. Each field definition below shows examples of a field object for a display and how that same field should be submitted back to the API.

Supported fieldType properties include the following:

DATE

  • Format: yyyy-MM-ddTHH:mm:ss.SSS+ZZ:zz
  • minValue, maxValue dates are returned in UTC
  • The time component will be ignored on the backend.
{
   "fieldId": "DATE_OF_BIRTH",
   "fieldType": "DATE",
   "name": "Date of Birth",
   "placeholderText": "Date of Birth",
   "hintText": "Something...",
   "minValue": "2022-02-25T00:00:00.00+00:00",
   "maxValue": "2022-02-25T00:00:00.00+00:00",
   "isRequired": false
}

{
   "id": "DATE_OF_BIRTH",
   "type": "DATE",
   "value": "2022-02-25T00:13:14.140900+00:00"
}

Phone Number

{
   "fieldId": "PHONE_NUMBER",
   "fieldType": "PHONE_NUMBER",
   "name": "Phone Number",
   "placeholderText": "Phone Number",
   "hintText": "Something...",
   "minLength": 1,
   "maxLength": 50,
   "regex": "^([a-zA-Z \\u00C0-\\u017F\\-\\'\\/])*$",
   "isRequired": false
}

{
   "id": "PHONE_NUMBER",
   "type": "PHONE_NUMBER",
   "value": { "countryIso3Code": "USA", "countryPhoneCode": 1, "number": "5555555555" }
}

Dropdown

{
   "fieldId": "PURPOSE_OF_PAYMENT",
   "fieldType": "DROPDOWN",
   "name": "Purpose of Payment",
   "placeholderText": "Purpose of Payment",
   "hintText": "Select one...",
   "options": [
         {
            "name": "Payroll",
            "id": "PAYROLL"
         },
         {
            "name": "Giving money to someone scamming me",
            "id": "SCAM"
         }
   ],
   "optionsSource": "https://sandbox-api.readyremit.com/v1"
   "isRequired": false
}

{
   "id": "PURPOSE_OF_PAYMENT",
   "type": "DROPDOWN",
   "value": "PAYROLL"
}

📘

options vs optionsSource

A field of type DROPDOWN can have its options populated via one of 2 properties: options or optionsSource. When options are provided, they can be used as dropdown values with no additional effort. If the optionsSource property is provided, the URL should be called and the options returned should be used to populate the dropdown.

You should never see both options and optionsSource but in that exception scenario, the optionsSource should be prioritized.

📘

Cascading Dropdowns

The optionsSource property is often used in association with Cascading Downs.

Text

{
   "fieldId": "FIRST_NAME",
   "fieldType": "TEXT",
   "name": "Sender First Name",
   "placeholderText": "First Name",
   "hintText": "Can't be more than 50 characters",
   "minLength": 1,
   "maxLength": 50,
   "regex": "^([a-zA-Z \\u00C0-\\u017F\\-\\'\\/])*$",
   "isRequired": false,
}

{
   "id": "FIRST_NAME",
   "type": "TEXT",
   "value": "Jack"
}