Use webhooks to be notified about events that happen in a Gluwa account.
You can receive a webhook notification from Gluwa when there is a transaction associated with your account. Note that Gluwa only notifies you if the transaction or an exchange was created by using Gluwa API.
To integrate Gluwa webhook to your service you need to:
Create a webhook endpoint and on your server
Register your webhook endpoint
Verify your address
Step 1: Create a Webhook Endpoint
Create an endpoint that would accept the webhook requests and process them according to your business logic.
Webhook is sent as a POST request to the URL you will register in Step 2. The webhook may or may not have a request body depending on the type of the event. For more information, see Supported Webhook Events.
Checking the veracity of a request using X-REQUEST-SIGNATURE
To verify that the webhook is actually sent by Gluwa, you must check the validity ofX-REQUEST-SIGNATURE header. This involves generating X-REQUEST-SIGNATURE value on your own server and comparing it against the value of the X-REQUEST-SIGNATURE header sent with the webhook.
The status of the transaction.Unconfirmed, Confirmed, or Failed.
Unconfirmed - The transaction was announce to the blockchain, but is not included in any block yet.
Confirmed - The transaction was included in the blockchain and received a confirmation. Failed - The transaction has failed for some reason.
Used by the receiver of the receiver of the transaction to identify a payment. Supported by QR code payment feature only.
A message attached to the transaction. It is an optional memo you can associate with the transaction.