GET, POST | /BankAccount |
---|
export class BankAccountResult
{
public AccountName?: string;
public BankName?: string;
public SortCode?: string;
public IsValid?: boolean;
public IsDirectDebitCapable?: boolean;
public AccountNumber?: string;
public constructor(init?: Partial<BankAccountResult>) { (Object as any).assign(this, init); }
}
export class BankAccountResponse
{
/**
* Contains the bank account lookup result when successful.
*/
public Result: BankAccountResult;
/**
* Contains response status, details and errors.
*/
public ResponseStatus?: ResponseStatus;
public constructor(init?: Partial<BankAccountResponse>) { (Object as any).assign(this, init); }
}
export class BankAccountRequest
{
/**
* The bank sort code.
*/
// @Required()
public Sortcode?: string;
/**
* The bank account number.
*/
// @Required()
public AccountNumber?: string;
/**
* The Csr of the application (if available).
*/
public Csr?: string;
public constructor(init?: Partial<BankAccountRequest>) { (Object as any).assign(this, init); }
}
TypeScript BankAccountRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /BankAccount HTTP/1.1
Host: wpcdd-featuretest-ws.worldpay.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Sortcode":"String","AccountNumber":"String","Csr":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Result":{"AccountName":"String","BankName":"String","SortCode":"String","IsValid":false,"IsDirectDebitCapable":false,"AccountNumber":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}