Payment link (qr-code)
This page describes the process of requesting a payment link.
Step 1: Requesting a payment link
Requesting a payment link is nearly identical to the process as described in One-time or periodically recurring payment - Request a payment. There are two additional elements:
- paymentLink: Boolean. When set to true, the request will be interpreted as a request for a payment link.
- linkValidityDays: The amount of days the payment link will be valid. Default value is 14.
Authorization: JWT
URL: Url: https://api.sbx.globadyme.com/api/globadymeGateway/transaction/v2/requestPayment
Example:
{
"amount": "22.50",
"currency": "EUR",
"country": "NL",
"iban": "NL76INGB0001234567",
"description": "Payment link description",
"accountHolderName" : "test accountholder",
"emailAddress" : "test@test.com",
"paymentLink": true,
"linkValidityDays": 14
}
Step 2: Receive a response
Similar to described in One-time or periodically recurring payment, a response will be received. The only difference is the redirectUrl, which will be much shorter.
Example:
{
"message": "OK",
"details": {
"requestId": "b10f7340-e5c2-4c55-bb81-75c636340ca3",
"redirectUrl": "https://api.sbx.globadyme.com/api/link?id=4ZlCHvhI4OMLqp5A",
"linkUrl": "https://api.sbx.globadyme.com/api/link?id=4ZlCHvhI4OMLqp5A"
}
}
The redirectUrl can be used as a payment link.
Step 3: Request a QR code
The accessToken should be included when requesting a QR code as a bearer token in the Authorization header.
Url: https://api.sbx.globadyme.com/api/globadymeGateway/transaction/qrcode
Example:
curl --request GET \
--url https://api.sbx.globadyme.com/api/globadymeGateway/transaction/qrcode?id=4ZlCHvhI4OMLqp5A \
--header 'Authorization: Bearer eyJhbGciOiJIUzI... (shortened for readability) ...5buNiPnwYwyVjVaRfnMestLIqPOyC4K3PFO_217gg'
}'
The response will be a MediaType.IMAGE_PNG_VALUE.
Example: 