Payment link
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:
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: