Skip to main content

Webhooks

Introduction

Webhooks are a mechanism for receiving real-time event notifications from the Globiance system. With webhooks, you can subscribe to specific events related to checkouts and payments, and receive updates whenever those events occur. These updates are sent as HTTP POST requests to a callback URL of your choice.

This section provides information on setting up and configuring webhooks to receive event updates for checkouts and payments.

How to Setup

To set up webhooks for your Globiance account, follow these steps:

  1. Login to your Globiance account: Visit the Globiance website and login to your account using your credentials.

  2. Go to the Merchant section: Once logged in, navigate to the Merchant section in the navigation bar.

  3. Create a new store: In the Merchant section, find the option to create a new store and click on it. This will allow you to create a new store for your business.

  4. Configure the Callback URL: In the store creation process, you will come across a section where you can add your callback URL. This URL is where Globiance will send the webhook event updates for checkouts and payments. Provide the appropriate URL for your application's webhook handler.

    Note: Make sure that the callback URL is publicly accessible and can handle incoming HTTP POST requests.

  5. Save the store configuration: Once you have added the callback URL, save the store configuration.

After completing these steps, your webhook setup is complete. The Globiance system will now send event updates to the provided callback URL whenever relevant events related to checkouts and payments occur.

Make sure to implement the necessary logic in your application to handle and process these webhook event updates effectively.

Events

Checkout Events

  1. cancelled
  2. completed
  3. expired

Payment Events

  1. update
  2. confirmed
  3. settled
  4. dispute
  5. refund success
  6. refund rejected

Event Payloads

When you receive webhook event notifications on your callback URL, the payload will contain information about the event and related entities. Below are the available events for checkouts and payments:

Checkout Events

Event: cancelled

This event indicates that a checkout has been cancelled.

Response Data

  • storeId (string): The ID of the store associated with the checkout.
  • type (string): The event type, which is "checkout".
  • event (string): The specific event, which is "cancelled".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout.
  • clientId (string | null): The ID of the client associated with the checkout (can be null).
  • itemId (string | null): The ID of the item associated with the checkout (can be null).
  • itemName (string | null): The name of the item associated with the checkout (can be null).
  • note (string | null): Additional note for the checkout (can be null).

Example Result:

{
"event": "cancelled",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "checkout",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Cancellation reason",
"payload": {
"checkoutId": "1234567890"
}
}

Event: completed

This event indicates that a checkout has been completed.

Response Data

  • storeId (string): The ID of the store associated with the checkout.
  • type (string): The event type, which is "checkout".
  • event (string): The specific event, which is "completed".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout.
  • clientId (string | null): The ID of the client associated with the checkout (can be null).
  • itemId (string | null): The ID of the item associated with the checkout (can be null).
  • itemName (string | null): The name of the item associated with the checkout (can be null).
  • note (string | null): Additional note for the checkout (can be null).

Example Result:

{
"event": "completed",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "checkout",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"checkoutId": "1234567890"
}
}

Event: expired

This event indicates that a checkout has been expired.

Response Data

  • storeId (string): The ID of the store associated with the checkout.
  • type (string): The event type, which is "checkout".
  • event (string): The specific event, which is "expired".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout.
  • clientId (string | null): The ID of the client associated with the checkout (can be null).
  • itemId (string | null): The ID of the item associated with the checkout (can be null).
  • itemName (string | null): The name of the item associated with the checkout (can be null).
  • note (string | null): Additional note for the checkout (can be null).

Example Result:

{
"event": "expired",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "checkout",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Expired reason",
"payload": {
"checkoutId": "1234567890"
}
}

Payment Events

Event: update

This event indicates an update related to a payment.

Response Data

  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "update".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout associated with the payment.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • timestamp (string): The timestamp of the payment update.

Example Result:

{
"event": "update",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": false,
"refunded": false,
"timestamp": "2023-05-30T12:34:56Z"
}
}
}

Event: confirmed

This event indicates that a payment has been confirmed.

Response Data

  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "confirmed".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout associated with the payment.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • timestamp (string): The timestamp of the payment confirmation.

Example Result:

{
"event": "confirmed",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": false,
"refunded": false,
"timestamp": "2023-05-30T12:34:56Z"
}
}
}

Event: settled

This event indicates that a payment has been settled.

Response Data

  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "settled".
  • checkoutTime (string): The timestamp when the checkout was created.
  • checkoutId (string): The ID of the checkout associated with the payment.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • timestamp (string): The timestamp of the payment settlement.

Example Result:

{
"event": "settled",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": false,
"refunded": false,
"timestamp": "2023-05-30T12:34:56Z"
}
}
}

Event: dispute

This event indicates that a payment is under dispute.

Response Data

  • checkoutId (string): The ID of the checkout associated with the payment.
  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "dispute".
  • checkoutTime (string): The timestamp when the checkout was created.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • disputeType (string): The type of dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • timestamp (string): The timestamp of the dispute.

Example Result:

{
"event": "dispute",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": true,
"disputeType": "Fraud",
"refunded": false,
"timestamp": "2023-05-30T12:34:56Z"
}
}
}


Event: refund success

This event indicates that a payment refund has been completed.

Response Data

  • checkoutId (string): The ID of the checkout associated with the payment.
  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "refund success".
  • checkoutTime (string): The timestamp when the checkout was created.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • refundStatus (string): The status of the refund.
  • timestamp (string): The timestamp of the refund success.

Example Result:

{
"event": "refund success",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": true,
"disputeType": "Fraud",
"refunded": true,
"refundStatus": "Success",
"timestamp": "2023-05-30T12:34:56Z"
}
}
}


Event: refund rejected

This event indicates that a payment refund has been rejected.

Response Data

  • checkoutId (string): The ID of the checkout associated with the payment.
  • storeId (string): The ID of the store associated with the payment.
  • type (string): The event type, which is "payment".
  • event (string): The specific event, which is "refund rejected".
  • checkoutTime (string): The timestamp when the checkout was created.
  • clientId (string | null): The ID of the client associated with the payment (can be null).
  • itemId (string | null): The ID of the item associated with the payment (can be null).
  • itemName (string | null): The name of the item associated with the payment (can be null).
  • note (string | null): Additional note for the payment (can be null).
  • paymentId (string): The ID of the payment.
  • currencyName (string): The currency for the payment.
  • amount (number): The amount of the payment.
  • amountDistributed (number): The distributed amount of the payment.
  • transactionType (string): The transaction type of the payment ("wallet" or "blockchain").
  • status (string): The status of the payment ("processing" or"confirmed" or "refunded" or "disputed" or "partially refunded").
  • isUnderDispute (boolean): Indicates if the payment is under dispute.
  • refunded (boolean): Indicates if the payment has been refunded.
  • refundStatus (string): The status of the refund.
  • cancelReason (string): The reason for the refund rejection.
  • timestamp (string): The timestamp of the refund rejection.

Example Result:

{
"event": "refund rejected",
"checkoutId": "1234567890",
"storeId": "store123",
"type": "payment",
"checkoutTime": "2023-05-30T12:34:56Z",
"clientId": "client123",
"itemId": "item123",
"itemName": "Example Item",
"note": "Additional notes",
"payload": {
"payment": {
"paymentId": "payment123",
"checkoutId": "1234567890",
"currencyName": "USD",
"amount": 100,
"amountDistributed": 90,
"transactionType": "Sale",
"status": "Success",
"isUnderDispute": true,
"disputeType": "Fraud",
"refunded": false,
"refundStatus": "Rejected",
"cancelReason": "Invalid refund request",
"timestamp": "2023-05-30T12:34:56Z"
}
}
}