The Paylink API allows you to redirect users to your own webpage after a payment has been completed and can send a webhook to your desired endpoint.
Redirect URL
By adding a redirect_url when creating a paylink, instead of the user being redirected to the set url with the following query parameters on the address:
customerName: Name of the customer that the paylink was made for.status: Will show whether the paylink has been paid or requires another attempt.amount: amount the customer paid.reference: Thetransaction_uniqueentered when creating the paylink.
Example
https://demo.com?customerName=Fred%2B&status=Paid&amount=12.32&reference=Test
Notification URL
When a paylink has been succesfully paid, Blink Payment will send a POST request to the endpoint entered in Paylink creation. the request will contain a body with the following details:
transaction_id: The identifier of the transaction that was made form this paylink.paylink_id: The identifier for this paylink. Use the id to retreieve more information here.name: Name of the customer that the paylink was made for.reference: Thetransaction_uniqueentered when creating the paylink.amount: The amount paid through the paylink.payment_method: Method the customer decided to pay. Ther results will be either:credit-cardopen-bankingdirect-debit
status: status of the paylink, e.g. Paid.note: The note that was entered when creating the paylink.
Example
{
"transaction_id": "354792196",
"paylink_id": 565226,
"name": "Fred Bloggs",
"amount": "12.32",
"reference": "Test",
"payment_method": "open-banking",
"status": "Paid",
"note": "Please pay promptly"
}