Create Payment Request

POST {{base_url}}/banking/v2/pay/payment-request

The 'Create Payment Request' endpoint can be used to create request to pay link which will be powered by tomato pay web payment journey with pre-filled creditor and payment details.

On clicking the web app, the user can make a payment by selecting their bank.

Attributes

FieldTypeDescription
creditorJSON objectCreditor information
creditor -> accountIdstringUnique identifier for the bank account (this is provided by Retrieve Bank Accounts endpoint)
currencystringAccount currency
amountintegerPayment amount
referencestringTransaction reference
paymentTypestringPayment type {DOMESTIC}
usagestring{SINGLE/MULTI}
Configure the request to take either single or multiple payments
isProtectedbooleanIf set to true, retrieve endpoints will mask bank account details.
purposestring{INVOICE, INSTANT_PAYMENTS, ECOMM, OTHERS}
Purpose for which the payment is being taken

Error Messages

ConditionResponse StatusResponse Body
No request body400 Bad Request{error: "Missing/Invalid json”}
No currency in the request body400 Bad Request{error: Missing/invalid currency}
No amount in the request body400 Bad Request{error: Missing/invalid amount}
Reference greater than 35 characters in the request body400 Bad Request{error: The reference field has a maximum of 18 chars}
Invalid type400 Bad Request{error: "Missing/Invalid type. Must be DOMESTIC
No creditor in the request body400 Bad Request{error: One of the following is mandatory: \[creditor, creditorAccountId\]}
Server error500 Internal server error

Request Body

{"creditor"=>{"accountId"=>"6f440597-5af7-45f9-bf0d-0abbea113abd"}, "currency"=>"GBP", "amount"=>"0.01", "reference"=>"test reference", "paymentType"=>"DOMESTIC", "usage"=>"SINGLE", "status"=>"ACTIVE", "isProtected"=>false, "purpose"=>"OTHERS"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
X-Api-Keystring
X-Partner-Idstring
Authorizationstring
X-Company-Idstring