Versions Compared

Key

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

Send a POST request to an external URL.

Anchorpost-notificationpost-notificationSend Notification

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 webhook passes a parameter 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

GET https://<return_url>?transaction_id=BL-002A12345&status=Pending%2BSubmission&note=Pending%2BSubmission&merchant_data=%257B%2522order_id%2522%253A%2522dd-12345678%2522%257D

Request

Code Block
GET https://my_domain/return?transaction_id=BL-002A12345&status=Pending%2BSubmission&note=Pending%2BSubmission&merchant_data=%257B%2522order_id%2522%253A%2522dd-12345678%2522%257D HTTP/1.1

Response

Code Block
HTTP/1.1 200 OK

Anchor
notification-webhook
notification-webhook

Notification Webhook

POST https://<your<notification_domain>/notificationurl>

Headers

Content-Typestring
Content type is JSON.Authorizationstring
Access token generated from create token request.

Attributes

transaction_idstring
Transaction IDid.

statusstring
StatusThe new status of the transaction.

notestring
NoteNotification note.

merchant_datajson
JSON string of all the optional data sent by the merchant.

Request

Code Block
POST https://<yourmy_domain>domain/notification HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
    "transaction_id": 210542"BL-****",
    "status": "Captured",
    "note": "Status changedchanges to Captured.",
 }

Response

Code Block
   "merchant_data": {
      "messageorder_id": "Success"
}1234567
    }
}

Response

Code Block
HTTP/1.1 200 OK