Retrieve a beneficiary template

POST: /amsin/api/v1/business/account/inquiryBeneficiaryTemplate Signature required

Before initializing a transfer, the Partner needs to create a beneficiary who is on the receiving end of the transfer.

To create a beneficiary, the Partner can use this API to obtain a beneficiary template.

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Request parameters

Field

Data type

Required

Description

countryCode

String

Yes

2-character ISO 3166 country/region code that represents the country/region where the beneficiary locates.

  • Maximum length: 2 characters

currency

String

Yes

3-character ISO 4217 currency code that represents the currency used. Currently, the following currencies are supported:

  • USD,EUR,GBP,NZD,CAD,AUD,JPY,SGD,HKD,CNH

Response parameters

Field

Data type

Required

Description

result

Result object

Yes

Indicates whether this API is called successfully.

responseId

String

Yes

The unique ID assigned by WorldFirst to identify a response.

More information:

  • Maximum length: 32 characters

cardTemplateData

List<CardTemplateField object>

Yes

General template for the beneficiary's bank account.

localCardTemplateData

List<CardTemplateField object>

No

Local template containing bank account fields required for the local clearing network. 

crossBorderCardTemplateData

List<CardTemplateField object>

No

Cross-border template containing bank account fields required for the cross-border clearing network. 

Result processing logic

Result of the API call

After calling the API, a response is returned. The possible responses for result.resultStatus are:

Result status

Description

S

This indicates the API call succeeded.

F

This indicates the API call failed. For more information on why the call failed, see result.resultCode.

U

This indicates the API call result is unknown. Partner can make a query when the returned status is UNKNOWN. Use the following query strategy:

  • A Partner can make 7 queries at maximum.
  • Intervals between queries: 5m, 10m, 20m, 40m, 80m, 160m, and 320m.

If none of the queries is successful, contact WorldFirst Technical Support.

Different types of templates

WorldFirst provides template information about the beneficiary in one or more of the following fields:

  • cardTemplateData indicates a general template, containing all related fields of the beneficiary's bank account information.
  • localCardTemplateData indicates a local template, containing bank account fields required for the local clearing network.
  • crossBorderCardTemplateData indicates a cross-border template, containing bank account fields required for the cross-border clearing network.

If more than one templates are returned in the response, all templates are applicable for the requested situation. In most cases, localCardTemplateData and crossBorderCardTemplateData provide more optimized templates with less required fields. Partner can use any one of the returned templates for beneficiary binding. Contact WorldFirst Technical Support if you have further questions.

Card template field list

This table is for reference only. Please refer to the template(s) returned in the response for applicable fields under different circumstances.

fieldName

fieldDescription

restrictionType

bankAccountName

Account name

PATTERN_RESTRICTION

bankAccountNo

Account number

PATTERN_RESTRICTION

bankName

Bank name

PATTERN_RESTRICTION

bankBIC

Bank BIC/SWIFT

PATTERN_RESTRICTION

bankAccountIBAN

IBAN

PATTERN_RESTRICTION

routingNumber

Routing Number

PATTERN_RESTRICTION

beneficiaryAddress

Beneficiary address

PATTERN_RESTRICTION

beneficiaryCountryCode

Beneficiary country code

PATTERN_RESTRICTION

beneficiaryPhone

Beneficiary phone

PATTERN_RESTRICTION

bankBranchCode

Bank branch code

PATTERN_RESTRICTION

bankAccountLocalName

Account name (in local language)

PATTERN_RESTRICTION

Result codes

result.resultCode

System-related result codes

resultCode

resultStatus

resultMessage

Further action

SUCCESS

S

Success

PROCESS_FAIL

F

A general business failure occurred. Do not retry.

Human intervention is usually needed. It is recommended that you contact our Technical Support Team to resolve the issue.

PARAM_ILLEGAL

F

Illegal parameters exist. For example, a non-numeric input, or an invalid date.

Check and verify whether the request fields, including the header fields and body fields, are correct and valid.

For details on the fields of each API, see the specific API Structure section.

UNKNOWN_EXCEPTION

U

API failed due to unknown reason.

The service might be down, retry later. If the issue persists, contact our Technical Support Team.

REQUEST_TRAFFIC_EXCEED_LIMIT

U

The request traffic exceeds the limit.

Call the interface again to resolve the issue. If the issue persists, contact our Technical Support Team.

OAUTH_FAIL

F

OAuth process failed.

Contact our Technical Support Team for detailed reasons.

INVALID_API

F

The called API is invalid or not active.

Check whether the correct API is being called.

INVALID_CLIENT

F

The client is invalid.

The Client ID does not exist or is invalid.

INVALID_SIGNATURE

F

The signature is invalid.

Make sure the request is properly signed with a valid signature.

METHOD_NOT_SUPPORTED

F

The server does not implement the requested HTTP method.

Ensure the HTTP method is POST.

Business-related result codes

resultCode

resultStatus

resultMessage

Further action

UN_SUPPORT_BUSINESS

F

Unsupported business.

Invalid parameters are used e.g. currency is incorrect. Retry with the correct information.

SYSTEM_ERROR

F

System error.

Do not retry, and contact our Technical Support Team for more details.

USER_NOT_EXIST 

F

The user does not exist.

Retry with the correct user information.

CARD_TEMPLATE_NOT_EXIST

F

No card templates met the query conditions.

Adjust the query and retry.

Samples

Sample for DE-EUR

Request body sample

copy
{
    "currency":"EUR",
    "countryCode":"DE"
}

Request calling samples

copy
var jsonStr="{\"currency\":\"EUR\",\"countryCode\":\"DE\"}";
var client = new RestClient("http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiaryTemplate");
var request = new RestRequest(Method.POST);
request.AddHeader("client-id","*****");
request.AddHeader("request-time","2022-05-17T11:19:20+08:00");
request.AddHeader("Content-Type","application/json");
request.AddHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t7*****");
request.AddParameter("application/json; charset=utf-8", jsonStr, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
copy
url = "http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiaryTemplate"
headers = {
    "client-id": "*****",
    "request-time": "2022-05-17T11:19:20+08:00",
    "Content-Type": "application/json",
    "signature": "algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t7*****"
}
datas ={"currency":"EUR","countryCode":"DE"}

res = requests.post(url=url, data=json.dumps(datas), headers=headers)
copy
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpPost httpPost = new HttpPost("http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiaryTemplate");
httpPost.addHeader("client-id", "*****");
httpPost.addHeader("request-time", "2022-05-17T11:19:20+08:00");
httpPost.addHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t7*****" );
httpPost.addHeader("Content-Type","application/json");
StringEntity entity = new StringEntity("{\"currency\":\"EUR\",\"countryCode\":\"DE\"}");
httpPost.setEntity(entity);
CloseableHttpResponse response = client.execute(httpPost);
copy
var xhr = new XMLHttpRequest;
xhr.open("POST","http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiaryTemplate",true)
xhr.setRequestHeader("client-id","*****");
xhr.setRequestHeader("request-time","2022-05-17T11:19:20+08:00");
xhr.setRequestHeader("Content-Type","application/json");
xhr.setRequestHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t7*****");
xhr.send("{\"currency\":\"EUR\",\"countryCode\":\"DE\"}"); 

Response body sample

copy
{
    "cardTemplateData": [
        {
            "fieldDescription": "Beneficiary account name",
            "fieldName": "bankAccountName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 70, only english uppercase and lowercase letters, numbers and special characters of ? - : ( ) ' . and spaces are supported",
                "restrictionRegex": "^[A-Za-z0-9/()\\s.,-?:'+]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary account name (in local language) ",
            "fieldName": "bankAccountLocalName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "Please fill out this required field",
                "restrictionRegex":"^[A-Za-z0-9/()\\s.,-?:'+*§©°¿ĢģĪīĶķĹŚśŪūΆΌΎΏΪЬьюя€\\u0021-\\u0027\\u003b-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a0-\\u00a3\\u00c0-\\u00d6\\u00d8-\\u00ff\\u0100-\\u0107\\u010a-\\u0113\\u0116-\\u011f\\u012e-\\u0133\\u013a-\\u013e\\u0141-\\u0148\\u0150-\\u0159\\u015e-\\u0165\\u016e-\\u0173\\u0178-\\u017e\\u0218-\\u021b\\u0388-\\u038a\\u0391-\\u03ce\\u0410-\\u042a\\u042e-\\u044a]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "SWIFT / BIC",
            "fieldName": "bankBIC",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The SWIFT code you entered is incorrect, please re-enter",
                "restrictionRegex": "^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "IBAN",
            "fieldName": "bankAccountIBAN",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The IBAN you entered is incorrect, please re-enter",
                "restrictionRegex": "^DE[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{10}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        }
    ],
    "crossBorderCardTemplateData": [
        {
            "fieldDescription": "Beneficiary account name",
            "fieldName": "bankAccountName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 70, only english uppercase and lowercase letters, numbers and special characters of ? - : ( ) ' . and spaces are supported",
                "restrictionRegex": "^[A-Za-z0-9/()\\s.,-?:'+]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary account name (in local language) ",
            "fieldName": "bankAccountLocalName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "Please fill out this required field",
                "restrictionRegex":"^[A-Za-z0-9/()\\s.,-?:'+*§©°¿ĢģĪīĶķĹŚśŪūΆΌΎΏΪЬьюя€\\u0021-\\u0027\\u003b-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a0-\\u00a3\\u00c0-\\u00d6\\u00d8-\\u00ff\\u0100-\\u0107\\u010a-\\u0113\\u0116-\\u011f\\u012e-\\u0133\\u013a-\\u013e\\u0141-\\u0148\\u0150-\\u0159\\u015e-\\u0165\\u016e-\\u0173\\u0178-\\u017e\\u0218-\\u021b\\u0388-\\u038a\\u0391-\\u03ce\\u0410-\\u042a\\u042e-\\u044a]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "SWIFT / BIC",
            "fieldName": "bankBIC",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The SWIFT code you entered is incorrect, please re-enter",
                "restrictionRegex": "^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "IBAN",
            "fieldName": "bankAccountIBAN",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The IBAN you entered is incorrect, please re-enter",
                "restrictionRegex": "^DE[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{10}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        }
    ],
    "localCardTemplateData": [
        {
            "fieldDescription": "SWIFT / BIC",
            "fieldName": "bankBIC",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The SWIFT code you entered is incorrect, please re-enter",
                "restrictionRegex": "^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary account name",
            "fieldName": "bankAccountName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 70, only english uppercase and lowercase letters, numbers and special characters of ? - : ( ) ' . and spaces are supported",
                "restrictionRegex": "^[A-Za-z0-9/()\\s.,-?:'+]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "IBAN",
            "fieldName": "bankAccountIBAN",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The IBAN you entered is incorrect, please re-enter",
                "restrictionRegex": "^DE[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{10}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        }
    ],
    "responseId": "*****",
    "result": {
        "resultCode": "SUCCESS",
        "resultMessage": "success",
        "resultStatus": "S"
    }
}

Sample for BD-USD

Request body sample

copy
{
    "currency":"USD",
    "countryCode":"BD"
}

Response body sample

copy
{
    "cardTemplateData": [
        {
            "fieldDescription": "Beneficiary account name",
            "fieldName": "bankAccountName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 70, only english uppercase and lowercase letters, numbers and special characters of ? - : ( ) ' . and spaces are supported",
                "restrictionRegex": "^[A-Za-z0-9/()\\s.,-?:'+]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "SWIFT / BIC",
            "fieldName": "bankBIC",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The SWIFT code you entered is incorrect, please re-enter",
                "restrictionRegex": "^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary account number",
            "fieldName": "bankAccountNo",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 34, only english uppercase letters and numbers are supported",
                "restrictionRegex": "^[A-Z0-9]{0,34}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary phone",
            "fieldName": "beneficiaryPhone",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "Please fill out this required field",
                "restrictionRegex": "^[0-9]*$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        }
    ],
    "crossBorderCardTemplateData": [
        {
            "fieldDescription": "Beneficiary account name",
            "fieldName": "bankAccountName",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 70, only english uppercase and lowercase letters, numbers and special characters of ? - : ( ) ' . and spaces are supported",
                "restrictionRegex": "^[A-Za-z0-9/()\\s.,-?:'+]{0,70}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "SWIFT / BIC",
            "fieldName": "bankBIC",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The SWIFT code you entered is incorrect, please re-enter",
                "restrictionRegex": "^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary account number",
            "fieldName": "bankAccountNo",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "The characters exceed the length limit of 34, only english uppercase letters and numbers are supported",
                "restrictionRegex": "^[A-Z0-9]{0,34}$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        },
        {
            "fieldDescription": "Beneficiary phone",
            "fieldName": "beneficiaryPhone",
            "required": "Y",
            "restriction": {
                "restrictionMsg": "Please fill out this required field",
                "restrictionRegex": "^[0-9]*$",
                "restrictionType": "PATTERN_RESTRICTION"
            }
        }
    ],
    "responseId": "*****",
    "result": {
        "resultCode": "SUCCESS",
        "resultMessage": "success",
        "resultStatus": "S"
    }
}

@2024 WorldFirst