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.

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 transationtransaction_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. It will be in base64_encoded format.

statusstring
Status.

notestring
Note.

Request

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

{
    "transaction_id": 210542***,
    "status": "Captured",
    "notemessage": "Status changed to Captured." 
}

Response

Code Block
{
   
}

Anchor
notification-webhook
notification-webhook

Notification Webhook

POST https://<notification_url>

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/notifications
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
    "transaction_id": 210542***,
    "status": "Captured",
    "note": "Status changed to Captured." 
}

Response

Code Block
{
    "message": "Success"
}