Capture bank details with payment templates
How to capture bank details with payment templates. Useful for specific country/currency combinations:
-
getPaymentTemplatesV2 request schema and elements
-
getPaymentTemplatesV2 response schema and elements
-
Example request and response, including a multiple options response
getPaymentTemplatesV2 request schema
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getPaymentTemplatesV2 xmlns="http://merchantapi.envoyservices.com">
<auth>
<username>string</username>
<password>string</password>
</auth>
<requestReference>string</requestReference>
<criteria>
<country>string</country>
<currency>string</currency>
<language>string</language>
<templateType>string</templateType>
<extraField>string</extraField>
</criteria>
</getPaymentTemplatesV2>
</soap:Body>
</soap:Envelope>
getPaymentTemplatesV2 elements
Lvl |
Element |
Description |
Values/ Limitations |
---|---|---|---|
1 |
auth |
Contains the elements related to the authorisation of a request. |
Complex Type Mandatory |
2 |
username |
Username for this merchant (or API user). |
6 to 50 alpha-numeric characters Mandatory |
2 |
password |
Password for this merchant. |
6 to 50 alpha-numeric characters Mandatory |
1 |
requestReference |
Unique field used if a valid response is not received to this request. The request can be called again with the same requestReference, returning the original response. |
6 to 50 alpha-numeric characters Mandatory |
1 |
criteria |
Contains further child elements describing the criteria for payment templates to retrieve. |
Complex Type Mandatory |
2 |
country |
The country of the beneficiary’s bank. |
2 alpha characters, as per the ISO 3166-1 English country code standard Mandatory |
2 |
currency |
The currency in which the beneficiary will receive funds. |
3 alpha characters as per the ISO 4217 currency code standard Mandatory |
2 |
language |
The payment template labels and tooltips language, currently only available for “en” (English). |
ISO 2-char language code Optional |
2 |
paymentType |
The payment type for which this template will be used |
“Push to Account” Optional |
2 |
extraField |
For future use |
Optional |
getPaymentTemplatesV2Response schema
If no template is available for a combination, we provide a default International template.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getPaymentTemplatesV2Response xmlns="http://merchantapi.envoyservices.com">
<getPaymentTemplatesV2Result>
<receivedDate>dateTime</receivedDate>
<statusCode>int</statusCode>
<statusMessage>string</statusMessage>
<requestReference>string</requestReference>
<paymentTemplates>
<paymentTemplate TemplateID="string" Name="string" TransferTypeDesc="string" TemplateType="int" TemplateCurrency="string" TemplateCountry="string" ErrorCode="int" ErrorMsg="string">
<Row Section="string" SectionTag="string" Title="string" ShowTitle="string" FieldType="string" Id="string" InputType="string" Required="string" Visibility="string" LabelTooltip="string" Tooltip="string" MinLength="int" MaxLength="int" MaxLengthIncludesNonAlpha="string" ErrorCode="int" ErrorMsg="string" OptionValue="string" OptionText="string" Spacer="string" Value="string" />
<Row Section="string" SectionTag="string" Title="string" ShowTitle="string" FieldType="string" Id="string" InputType="string" Required="string" Visibility="string" LabelTooltip="string" Tooltip="string" MinLength="int" MaxLength="int" MaxLengthIncludesNonAlpha="string" ErrorCode="int" ErrorMsg="string" OptionValue="string" OptionText="string" Spacer="string" Value="string" />
<Row Section="string" SectionTag="string" Title="string" ShowTitle="string" FieldType="string" Id="string" InputType="string" Required="string" Visibility="string" LabelTooltip="string" Tooltip="string" MinLength="int" MaxLength="int" MaxLengthIncludesNonAlpha="string" ErrorCode="int" ErrorMsg="string" OptionValue="string" OptionText="string" Spacer="string" Value="string" />
<Row Section="string" SectionTag="string" Title="string" ShowTitle="string" FieldType="string" Id="string" InputType="string" Required="string" Visibility="string" LabelTooltip="string" Tooltip="string" MinLength="int" MaxLength="int" MaxLengthIncludesNonAlpha="string" ErrorCode="int" ErrorMsg="string" OptionValue="string" OptionText="string" Spacer="string" Value="string" />
</paymentTemplate>
</paymentTemplates>
</getPaymentTemplatesV2Result>
</getPaymentTemplatesV2Response>
</soap:Body>
</soap:Envelope>
getPaymentTemplatesV2Response elements
Lvl |
Element |
Attribute |
Description |
Values / Limitations |
---|---|---|---|---|
1 |
getPaymentTemplatesV2Result |
Contains elements related to the status of the request and paymentTemplates returned for successful requests |
Complex Type Mandatory |
|
2 |
receivedDate |
The date and time the request was received by the Worldpay API, configured for GMT/UTC. |
yyyy-mm-ddThh:mm:ss.nn (the ‘T’ remains in the string and does not get replaced by a value. ‘nn’ represents hundredths of a second) Mandatory |
|
2 |
statusCode |
Shows the result of the request. Zero and positive values signify success, negative values represent failure. A full list of status codes and their meanings is shown in Status Codes. |
Numeric between -32000 and 32000. Mandatory |
|
2 |
statusMessage |
The outcome of the request, containing reason for failure if applicable. |
1 to 255 alpha-numeric characters. Mandatory |
|
2 |
requestReference |
The requestReference passed in the getPaymentTemplates request. |
6 to 50 alpha-numeric characters Mandatory |
|
2 |
paymentTemplates |
Contains paymentTemplate children. |
Complex Type Optional |
|
3 |
paymentTemplate |
A number of Row elements representing the bank data that needs to be captured. A Row element can contain further child Row elements and various attributes. |
Complex Type Mandatory |
|
|
|
TemplateID |
A unique identifier associated with the given template. |
Mandatory |
|
|
Name |
The country name the template suits. |
Up to 50 characters. Mandatory |
|
|
TransferTypeDesc |
The bank transfer type the template suits. |
Up to 50 characters. Examples are “International Payment”, “Local Payment” Mandatory |
|
|
TemplateType |
An enumeration for the template type. |
Integer Optional |
|
|
TemplateCurrency |
The currency the template suits. |
3 alpha characters as per the ISO 4217 currency code standard Optional |
|
|
TemplateCountry |
The country code the template suits. |
2 alpha characters, as per the ISO 3166-1 English country code standard Mandatory |
|
|
ErrorCode |
Whether a submitted template contains invalid data (Not used in getPaymentTemplates request). |
Integer Optional |
|
|
ErrorMsg |
A descriptive error message related to the ErrorCode attribute value (Not used in getPaymentTemplates request). |
String Optional |
4 |
Row |
|
Defines a field or row in a payment template. The properties of each field are defined as attributes in the Row element. |
Complex Type Mandatory |
|
|
Section |
If provided, can be a header for a subset of bank details when the payment template is rendered on the merchant’s side. |
String For example, “Beneficiary Details”, “Beneficiary Bank Details”. Optional |
|
|
SectionTag |
If provided, indicates the type of entity the row references. |
String For example, “R” for remitter, “B” for beneficiary Optional |
|
|
Title |
The label of the bank data field that the row represents. |
String Mandatory |
|
|
FieldType |
The type of UI control that should be used to capture this data. |
String For example, “Input”, “Select” Mandatory |
|
|
Id |
The Id that should be assigned to the control capturing the data. |
String All possible values are listed in Payment template fields. Mandatory |
|
|
InputType |
Specifies whether the data captured can be numeric. |
String For example: “n” for numeric, “na” for alpha-numeric Mandatory |
|
|
Required |
Indicates if the bank data field is mandatory. |
Boolean String Mandatory |
|
|
Visibility |
Indicates if the row should be displayed to the customer. If not provided, the row should be displayed. |
Boolean String Mandatory |
|
|
LabelTooltip |
Used where an explanation is added about the bank data being captured. |
String Mandatory |
|
|
Tooltip |
Instructs the user about restrictions for particular bank data fields. |
String Mandatory |
|
|
MinLength |
The minimum length accepted. |
Integer Mandatory |
|
|
MaxLength |
The maximum length accepted. |
Integer Mandatory |
|
|
MaxLengthIncludesNonAlpha |
Indicating whether non-alpha characters should contribute to length restrictions. |
Boolean String Mandatory |
|
|
OptionText |
Used in child rows of Rows where the InputType indicates a selection, usually a dropdown list. The attribute value specifies the text that should appear in the dropdown list. |
String Optional |
|
|
OptionValue |
Used in child rows of Rows where the InputType indicates a selection, usually a dropdown list. The attribute value specifies the value that should be associated with this option when selected. |
String Optional |
|
|
Spacer |
Used to indicate what separator character should be used when multiple child Rows exist under a parent Row. |
String Optional |
|
|
ErrorCode |
Indicates if the specific row of a submitted payment template contains invalid data. (Not used in getPaymentTemplates request). |
Integer Optional |
|
|
ErrorMsg |
A descriptive error message related to the ErrorCode attribute value. |
String Optional |
|
|
Value |
The captured value for the given bank data field. Not used in getPaymentTemplates request. |
String Optional |
Example request and response
Request
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getPaymentTemplatesV2 xmlns="http://merchantapi.envoyservices.com">
<auth>
<username>amerchant25</username>
<password>s23dLjdf</password>
</auth>
<requestReference>Request01</requestReference>
<criteria>
<country>GB</country>
<currency>GBP</currency>
<language>en</language>
</criteria>
</getPaymentTemplatesV2>
</soap:Body>
</soap:Envelope>
Response
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getPaymentTemplatesV2Response xmlns="http://merchantapi.envoyservices.com">
<getPaymentTemplatesV2Result>
<receivedDate>2013-02-11T17:12:48.4950127+00:00</receivedDate>
<statusCode>0</statusCode>
<statusMessage>Success</statusMessage>
<requestReference>Request01</requestReference>
<paymentTemplates>
<PaymentTemplate xmlns="" Name="United Kingdom" TransferTypeDesc="Local Payment" TemplateID="f4bc918f56d9e011b725001ec9e61285" TemplateType="1" TemplateCountry="GB" TemplateCurrency="GBP" TemplateLanguage="">
<Row Title="Bank Name" Id="BankName" FieldType="Input" InputType="na" Required="true" LabelTooltip="" Tooltip="Enter the receiving bank name" MinLength="1" MaxLength="50" />
<Row Title="Branch Location" Id="BranchAddress" FieldType="Input" InputType="na" LabelTooltip="" Tooltip="Enter the receiving bank’s branch location" MinLength="1" MaxLength="50" />
<Row Title="Payee" Id="CustomerName" FieldType="Input" InputType="na" Required="true" LabelTooltip="" Tooltip="Enter the recipient’s account name as it appears on the recipient bank statement" MinLength="1" MaxLength="35" />
<Row Title="Account Number" Id="BankAccountNumber" FieldType="Input" InputType="n" MaxLengthIncludesNonAlpha="false" Required="true" LabelTooltip="" Tooltip="Enter the bank account number which can be up to 8 digits in length" MinLength="8" MaxLength="8" />
<Row Title="Sort Code" Id="BankCode" FieldType="Complex" InputType="n" MaxLengthIncludesNonAlpha="false" LabelTooltip="" Tooltip="Enter the sort code which totals 6 digits in length" Required="true" MinLength="6" MaxLength="6">
<Row Id="BankCode1" Title="Sort Code Part 1" FieldType="Input" InputType="n" MaxLengthIncludesNonAlpha="false" LabelTooltip="" Tooltip="Sort Code Part 1" MinLength="2" MaxLength="2" Overflow="false" Required="true" Spacer="-" />
<Row Id="BankCode2" Title="Sort Code Part 2" FieldType="Input" InputType="n" MaxLengthIncludesNonAlpha="false" LabelTooltip="" Tooltip="Sort Code Part 2" MinLength="2" MaxLength="2" Overflow="false" Required="true" Spacer="-" />
<Row Id="BankCode3" Title="Sort Code Part 3" FieldType="Input" InputType="n" MaxLengthIncludesNonAlpha="false" LabelTooltip="" Tooltip="Sort Code Part 3" MinLength="2" MaxLength="2" Overflow="false" Required="true" />
</Row>
</PaymentTemplate>
</paymentTemplates>
</getPaymentTemplatesV2Result>
</getPaymentTemplatesV2Response>
</soap:Body>
</soap:Envelope>
Multiple options example response
When multiple options are available for a field, all the available options for that field will be returned in the response. This should be used for rendering drop down lists. An example response containing a field with multiple options is:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getPaymentTemplatesV2Response xmlns="http://merchantapi.envoyservices.com">
<getPaymentTemplatesV2Result>
<receivedDate>2013-02-11T17:12:48.4950127+00:00</receivedDate>
<statusCode>0</statusCode>
<statusMessage>Success</statusMessage>
<requestReference>Request01</requestReference>
<paymentTemplates>
<paymentTemplate TemplateID="b83d9a3097ade61195cf005056b70b4f" Name="United States" TransferTypeDesc="Local Payment" TemplateType="1" TemplateCurrency="USD" TemplateCountry="US">
<Row Section="Beneficiary Bank Details" Title="Bank Name" FieldType="Input" Id="BankName" InputType="na" Required="true" LabelTooltip="Your bank name" Tooltip="Please enter the name of your bank" MinLength="2" MaxLength="50"/>
<Row Section="Beneficiary Bank Details" Title="Payee" FieldType="Input" Id="CustomerName" InputType="na" Required="true" LabelTooltip="Your full name or legal company name" Tooltip="Please enter your full name, including first and last name (if an individual) e.g John Smith OR your full legal company name (if a company) e.g ABC Limited" MinLength="2" MaxLength="35"/>
<Row Section="Beneficiary Bank Details" Title="Account Number" FieldType="Input" Id="BankAccountNumber" Required="true" LabelTooltip="" Tooltip="Enter the beneficiary's account number" MinLength="4" MaxLength="17" MaxLengthIncludesNonAlpha="false"/>
<Row Section="Beneficiary Bank Details" Title="ABA Routing Code" FieldType="Input" Id="BankCode" InputType="n" Required="true" LabelTooltip="" Tooltip="Enter the ABA routing code which is 9 digits in length. This must not be a FedWire code." MinLength="9" MaxLength="9" MaxLengthIncludesNonAlpha="false"/>
<Row Section="Beneficiary Bank Details" Title="Account Type" FieldType="Select" Id="AccountType" InputType="n" Required="true" LabelTooltip="" Tooltip="Select the beneficiary's bank account type" MinLength="1" MaxLength="1">
<Row Id="AccountType1" InputType="na" MinLength="0" MaxLength="0" OptionValue="AccountType:0" OptionText="Checking"/>
<Row Id="AccountType2" InputType="na" MinLength="0" MaxLength="0" OptionValue="AccountType:1" OptionText="Savings"/>
</Row>
<Row Section="Beneficiary Details" Title="Address" FieldType="Input" Id="AddressLine1" Required="true" LabelTooltip="House number/name and street name" Tooltip="Please enter your residential (if an individual) or registered (if a company) house number/name and street name e.g 1 Main Street" MinLength="2" MaxLength="70"/>
<Row Section="Beneficiary Details" Title="City" FieldType="Input" Id="City" Required="true" LabelTooltip="Town/City" Tooltip="Please enter city or town of your residential (if an individual) or registered (if a company) address e.g London" MinLength="2" MaxLength="35"/>
<Row Section="Beneficiary Details" Title="State" FieldType="Select" Id="State" InputType="na" Required="false" LabelTooltip="" Tooltip="Enter the Beneficiary's State" MinLength="1" MaxLength="2">
<Row Id="country1" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:AL" OptionText="Alabama - AL"/>
<Row Id="country2" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:AK" OptionText="Alaska - AK"/>
<Row Id="country3" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:AZ" OptionText="Arizona - AZ"/>
<Row Id="country4" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:AR" OptionText="Arkansas - AR"/>
<Row Id="country5" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:CA" OptionText="California - CA"/>
<Row Id="country49" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:WI" OptionText="Wisconsin - WI"/>
<Row Id="country50" InputType="na" MinLength="0" MaxLength="0" OptionValue="State:WY" OptionText="Wyoming - WY"/>
</Row>
<Row Section="Beneficiary Details" Title="Zip Code/Post Code" FieldType="Input" Id="Postcode" InputType="na" Required="true" Tooltip="Please enter postal/zip code of your residential (if an individual) or registered (if a company) address" MinLength="2" MaxLength="10"/>
<Row Section="Beneficiary Details" Title="Country" FieldType="Input" Id="CountryCode" InputType="na" Required="true" LabelTooltip="Please Select" Tooltip="Please select the country of your residential (if an individual) or registered (if a company) address" MinLength="1" MaxLength="2" MaxLengthIncludesNonAlpha="false"/>
<Row Section="Beneficiary Details" Title="Date of Birth" FieldType="Input" Id="DateOfBirth" Required="false" LabelTooltip="DD MM YYYY" Tooltip="Please select your date of birth (if an individual only)" MinLength="10" MaxLength="10"/>
</paymentTemplate>
</paymentTemplates>
</getPaymentTemplatesV2Result>
</getPaymentTemplatesV2Response>
</soap:Body>
</soap:Envelope>
Payment template fields
Beneficiary Details
Id |
Content |
Value / Limitations |
---|---|---|
CustomerName |
If the beneficiary (payee) is an individual, this should be their full name, including first and last name (no initials) with a space in-between. |
String up to 50 characters Mandatory |
Title |
Title of the beneficiary, e.g. Mr/Ms/Mrs etc. "Company" can be used to indicate the beneficiary is not an individual. |
String up to 15 characters Optional |
PlaceOfBirth |
Beneficiary city/state of birth. Only applicable to an individual beneficiary type. |
String up to 50 characters Optional |
CountryOfBirth |
Beneficiary Country of birth in the ISO 2-character format. Only applicable to an individual beneficiary type. |
String 2 characters Optional |
DateOfBirth |
Beneficiary date of birth. Only applicable to an individual beneficiary type. |
Date in the format DD-MM-YYYY Optional |
AddressLine1 |
First part of the beneficiary residential address. |
String up to 100 characters Optional |
AddressLine2 |
Second part of the beneficiary residential address. |
String up to 100 characters Optional |
AddressLine3 |
Third part of the beneficiary residential address. |
String up to 100 characters Optional |
City |
City of the beneficiary residential address. |
String up to 50 characters Optional |
State |
Full name, not 2 character, of the State or County or Province of the beneficiary residential address. |
String up to 50 characters Optional |
CountryCode |
Country code of the beneficiary residential address. |
String 2 characters ISO 3166-1 English country code standard Optional |
Postcode |
Postcode of the beneficiary residential address. |
String up to 20 characters Optional |
Identification
Id |
Content |
Value / Limitations |
---|---|---|
IdType |
Type of beneficiary identification being captured:
|
String 1 character Optional |
IdValue |
Value of the beneficiary identification being captured. |
String up to 50 characters Optional |
Beneficiary Bank Details
Id |
Content |
Value / Limitations |
---|---|---|
BankAccountNumber |
Bank account number of the beneficiary (payee). If not provided then the IBAN is mandatory. |
String up to 35 characters Conditional |
IBAN |
The International Bank Account Number is the account number of the beneficiary (payee). If not being provided then the BankAccountNumber is mandatory. |
String up to 34 characters Conditional |
SWIFT |
The Bank Identification Code of the beneficiary (payee) bank. |
String either 8 or 11 characters Optional |
AccountType |
The type of account held by the beneficiary e.g. Checking or Savings:
|
String 1 character Optional |
BankName |
Name of the beneficiary (payee) bank. |
String up to 50 characters Optional |
BankCode |
Bank code (sometimes known as Sort Code or Routing Code) of the beneficiary bank. |
String up to 50 characters Optional |
BranchCode |
Branch code of the beneficiary bank. |
String up to 50 characters Optional |
AdditionalInfo1 |
Additional data which doesn’t fit into any other field. |
String up to 50 characters Optional |
AdditionalInfo2 |
Additional data which doesn’t fit into any other field. |
String up to 50 characters Optional |
AdditionalInfo3 |
Additional data which doesn’t fit into any other field. |
String up to 50 characters Optional |
BranchAddress |
Location of the beneficiary (payee) bank. The general location is acceptable e.g. “London”. |
String up to 50 characters Optional |
Remitter Details
Id |
Content |
Value / Limitations |
---|---|---|
R_FirstName |
If the remitter (payee) is an individual, supply their first name (no initials). For entities, provide the full legal name. |
String up to 30 characters Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
R_LastName |
If the remitter (payee) is an individual, supply their last name (no initials). For entities, provide the full legal name. |
String up to 30 characters Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
R_Title |
Title of the remitter, e.g. Mr/Ms/Mrs etc. "Company" can be used to indicate the remitter is not an individual. |
String up to 15 characters Optional |
R_PlaceOfBirth |
Remitter city/state of birth. Only applicable to an individual remitter type. |
String up to 50 characters Optional |
R_CountryOfBirth |
Remitter Country of birth in the ISO 2-character format. Only applicable to an individual remitter type. |
String 2 characters Optional |
R_DateOfBirth |
Remitter date of birth in format DD-MM-YYYY. Only applicable to an individual remitter type. |
Date in the format DD-MM-YYYY Optional |
R_AddressLine1 |
First part of the remitter residential address.
|
String up to 100 characters Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
R_AddressLine2 |
Second part of the remitter residential address. |
String up to 100 characters Optional |
R_AddressLine3 |
Third part of the remitter residential address. |
String up to 100 characters Optional |
R_City |
City of the remitter residential address. |
String up to 30 characters Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
R_State |
Full name, not 2 character, of the State or County or Province of the remitter residential address. |
String up to 35 characters Conditional Mandatory for Payment Service Provider merchants for countries with notion of states. Optional for all others. |
R_CountryCode |
2-character ISO country code of the remitter residential address. |
String 2 characters ISO 3166-1 English country code standard Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
R_Postcode |
Postcode of the remitter residential address. |
String up to 10 characters Conditional Mandatory for Payment Service Provider merchants. Optional for all others. |
Remitter Identification
Id |
Content |
Value / Limitations |
---|---|---|
R_IDType |
Type of remitter identification being captured:
|
String 1 character Optional |
R_IDValue |
Value of the remitter identification being captured. |
String up to 50 characters Optional |