Pay-in Instruction

Calling the Pay-In product API

To make an Instant Payment, the merchant will call Yaspa's HTTPS API Endpoint to generate

API Request

The following call is an HTTPS POST request

Headers

The following header must be attached to the request.

HeaderDescription
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

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

keyDescriptionValuesExample
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"
currencyA 3-letter ISO-4217 Currency code. Currently, only EUR and GBP are supported.String"EUR"
or
"GBP"
amountThe currency in decimal format. A value of 1.50 represents £1.50 in GBP currency.Number1.50
paymentGiroThe payment rail to be used for the payment. This must match the currency.
  • For GBP use FPS.
  • For EUR use SEPA (We will use either SCT or SEPA Instant based on the customer bank).
String"FPS"
or
"SEPA"
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"
journeyTypeThis changes aspects of the customer journey, allowing the merchant to gather additional data about the customer. Values are:
  • ENHANCED_PAY_IN - If the merchant wants the customer's bank details as they become available for KYC reasons. Most merchants use this setting.
  • HOSTED_PAYMENT - If the merchant does not want the customer's bank details.
  • HOSTED_VERIFIED_PAYMENT - If the merchant wants the customer's bank details as part of the initial payment request, this takes the customer through an additional consent process with their bank, making this a longer journey.
string"ENHANCED_PAY_IN"
or
"HOSTED_PAYMENT"
or
"HOSTED_VERIFIED_PAYMENT"

Body - Example body

Below is an example body of a pay-in instruction.

Please change the reference each time a pay-in instruction is used.

{
	"customerIdentifier":"CHANGE_TO_CUSTOMER_IDENTIFIER",
	"paymentGiro":"FPS",
	"amount":"1.00",
	"currency":"GBP",
	"reference":"CHANGE_TO_UNIQUE_REFERENCE",
	"journeyType": "ENHANCED_PAY_IN"
}

Body - Additional Optional Fields


keyDescriptionValuesExample
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"]
or
["FR"]
promoCodeWhere the payment can be attributed to a promotional bonus the promo code can be passed to Yaspa who can provide insights on the trends around specific codes.String"Welcome200"
successRedirectUrl

This is the URL the merchant wishes the customer to return to after a successful payment.

Used for SDK

String"http://www.merch.com/success"
successBankRedirectUrlThis is the URL the merchant wishes the customer to return to after a successful payment.String"http://www.merch.com/success"
failureRedirectUrl

This is the URL the merchant wishes the customer to return to after a failed payment.

Used for SDK

String"http://www.merch.com/failure"
failureBankRedirectUrlThis is the URL the merchant wishes the customer to return to after a failed payment.String"http://www.merch.com/failure"
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 customer's Browser language will be used.

String"FR"
bankThis parameter will lock payments to one bank. The payment will have that bank pre-chosen when the customer starts the journey.StringREVOLUT_EU, ING, etc.
See Instant Payments - Additional Features for the list of banks
searchableTextThis parameter will be shown in the Admin Dashboard, and merchants can search on this field.
This is used in cases where merchant systems have important IDs or custom data which your staff may wish to use to find Pay-ins
String"SomeID"
payloadThis parameter is cargo data and is passed through the Yaspa system and returned on the WebhooksString"SomePayload"
descriptionA 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, which should be sent to the merchant website and displayed to the customer

Example:

https://test-banks.yaspa.com/hosted?transaction-id=bd79cf18-7e82-c2a6-47d5-988a3e

What’s Next

Explore the Instant Pay-in APIs

Did this page help you?