Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A webhook is an event driven notification from Blink to your system. Webhooks are also known as callback or return URL.

The return webhook is triggered when the payment has been processed and the notification webhook is triggered when the transaction status is changed in Blink.

The user is redirected to the return_url or notification_url specified in the intent request.

The return webook passes a paramater called res in the URL. This res is the transaction_id in base64_encoded format, which you need decode using base64_decoded.


Anchor
return-webhook
return-webhook

Return Webhook

POST https://<return_url>?res=12345

Headers

Content-Typestring
Content type.

Authorizationstring
Access token generated from create token request.

Attributes

transaction_idstring
Transaction ID.

statusstring
Status.

notestring
Note.

Request

Code Block
POST https://my_domain/return?res=QkwtMDBGN0Q…..1Ng%3D%3D HTTP/1.1
Content-Type: application/json

Response

Code Block
HTTP/1.1 200 OK
Content-Type: application/json

Anchor
notification-webhook
notification-webhook

Notification Webhook

POST https://v1/pay/notification

Headers

Content-Typestring
Content type.

Authorizationstring
Access token generated from create token request.

Attributes

transaction_idstring
Transaction id.

statusstring
Status.

notestring
Note.

Request

Code Block
POST https://secure.blinkpayment.co.uk/api/v1/pay/notification HTTP/1.1
Content-Type: application/json
api-key: eyJ0eXAiOiJKV1QiLCJhbG...
secret-key: eyJ0eXAiOiJKV1QiLCJhbG...

{
    "transaction_id": "BL-****",
    "status": "Captured",
    "note": "Status changes to Captured",
    "merchant_data": {
      "order_id": 1234567
    }
}

Response

Code Block
HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "Success"
}