Hosted Payout Instruction
Calling the hosted payout product API
Hosted payouts allow customers to choose their bank account. This instruction is used for options 4-6 from Instant Payouts.
To make an Instant Payout, the merchant will call Yaspa's HTTPS API Endpoint to generate
API Request
The following call is an HTTPS POST request
- Production - http://api.yaspa.com/v2/payouts/hosted-payout/generate-link
- Test Sandbox - http://testapi.yaspa.com/v2/payouts/hosted-payout/generate-link
Headers
The following header must be attached to the request.
For security reasons a Signature and Expires-at header needs to be attached. See Instant Payouts - Signing Payout Instructions for more details.
Header | Description |
|---|---|
AuthorizationCitizen | This is the merchant api key from the Admin Dashboard - found on the Company Settings page. This secures the request to the merchant account |
Expires-at | UNIX timestamp for signature expiration |
Signature | Base 64 encoded signature |
Content-Type | 'application/json' |
Body - Mandatory Fields
The body of the request is a json object, the following keys/values are mandatory on the request
key | Description | Values | Example |
|---|---|---|---|
customerIdentifier | The merchant string reference for the customer. This must be unique per the customer. Yaspa uses the customerIdentifier to create saved accounts, so it's important no two customers share the same customerIdentifier. | String | "5f767df845" |
currency | A 3 letter ISO-4217 Currency code. Currently only EUR and GBP are supported | String | "EUR" |
amount | The currency in decimal format. A value of 1.50 represents £1.50 in GBP currency | Number | 1.50 |
paymentGiro | The payment rail to be used for the payment. This must match the currency
| String | "FPS" |
reference | A unique reference for the payment, this will be used in payment reconciliation. This must be unique for the merchant account and less than 17 characters, this is a limitation passed on from the bank | String | "gjkhg43hjkfds43" |
isQueued | Merchants who wish to approve payouts before they are submitted to their bank need to set this to true. | boolean | true |
Body - Example body
Below is an example body of a payout instruction.
Please change the reference each time a payout instruction is used.
{
"customerIdentifier":"CHANGE_TO_CUSTOMER_IDENTIFIER",
"paymentGiro":"FPS",
"amount":"1.00",
"currency":"GBP",
"reference":"CHANGE_TO_UNIQUE_REFERENCE",
"isQueued":true
}Body - Additional Optional Fields
key | Description | Values | Example |
|---|---|---|---|
disableAddingNewBanks | This flag states whether payouts should be open or closed loop. true - A Closed loop does not allow new bank accounts to be added and only accounts used for Payins (or Account Verifications) can be used for payouts. false - An Open loop allows new bank accounts to be added and used for payouts | boolean | true |
supportedCountries | This is an array of 2 letter country codes (Iso-3166). The first value in the array is used to set which country banks are shown to the customer by default. Yaspa suggests this is set to the signup country of the customer or simply to the most popular country of the merchant's business. Examples: | String | ["NL"] |
successRedirectUrl | This is the URL the merchant wishes the customer to return to after a successful payment. Used on desktop | String | |
successBankRedirectUrl | This is the URL the merchant wishes the customer to return to after a successful payment. Used on mobile | String | |
failureRedirectUrl | This is the URL the merchant wishes the customer to return to after a failed payment. Used on desktop | String | |
failureBankRedirectUrl | This is the URL the merchant wishes the customer to return to after a failed payment. Used on mobile | String | |
language | The 2 letter language code (ISO 639-1) that will be used to display all text in the customer journey. If no language is set or the language isn't supported or recognised, the customers Browser language will be used. | String | "FR" |
searchableText | This parameter will be shown in the Admin Dashboard and merchants can search on this field. | String | "SomeID" |
payload | This parameter is any JSON object. This is cargo data and is passed through the Yaspa system and returned on the Webhooks | Object | { } |
description | A description shown on the hosted page to describe what the pay-in is for. | String | "Charitable Donation" |
API Response
Response Body
The response body will contain a url for the customer journey, this should be sent to the merchant website and displayed to the customer
Example:
https://test-banks.yaspa.com/hosted/payout?transaction-id=2ad224ed-25f3-3109-0e5e-350496&secondTimeUser=falseUpdated about 1 month ago
Explore the Instant Pay-in APIs
