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 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.
Example:
{ "transaction" : { "merchantId": "7699cab7-2dfa-4981-9c90-0d0c93c801ac", "amount": "22.50", "currency": "EUR", "country": "NL", "iban": "NL76INGB0001234567", "description": "Payment link description", "accountHolderName" : "test accountholder", "emailAddress" : "test@test.com", "paymentLink": true, "linkValidityDays": 14 }, "password" : "apiPassword" } |
Step 2: Receive a response
Similar to described in chapter 1.2, 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://sandbox.globadyme.com/api/link?id=4ZlCHvhI4OMLqp5A" } } |
The redirectUrl can be used as a payment link.
Step 3: Optional - Request a QR code
It’s possible to request a QR code for a payment link. First, a JWT token must be obtained.
3.1 Obtain JWT
Url: https://sandbox.globadyme.com/api/api/auth/sign-in
Example request:
{ "user" : { "username" : "user@company.com", "password": "dashPassword" // The dashboard password as provided by Globadyme } } |
Example response:
{ "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhMkBiLmNvbSIsInVzZXJJZCI6ImM0MTRmMjM4LTAxZDgtNDQ5Yy04ZGM2LTJkM2M5MjQ0YTg4OSIsImF1dGgiOlt7ImF1dGhvcml0eSI6IlJPTEVfQ0xJRU5UIn1dLCJpYXQiOjE3MTM5OTI1NTksImV4cCI6MTcxMzk5NjE1OX0.RdEXGeG-E48N1Ocf1nB85eQx5TrZNMVYtK678NNZUzU", "tokenType": "Bearer", "refreshToken": "8bfe27e5-b6c6-4954-b63c-711d48724ce4", "userId": "c414f238-01d8-449c-8dc6-2d3c9244a889", "roles": [ "ROLE_CLIENT" ] } |
3.2 Request the QR code
The accessToken should be included when requesting a QR code as a bearer token in the Authorization header.
Url: https://sandbox.globadyme.com/api/globadymeGateway/transaction/qrcode
Example request:
https://sandbox.globadyme.com/link?id=ZM0G7ItMhLfVagGZ |
The response will be a MediaType.IMAGE_PNG_VALUE. Example: