Webhook Configuration & Processing

For EU product-specific webhook events and payloads, see Pay-in Webhooks, Payout Webhooks and Account Verification Webhook. For US product-specific events and payload structure, refer to Webhook Structure.


Setting Up Webhooks

Configure Webhook Notifications in the Admin Dashboard by navigating to Settings ➔ Company settings ➔ Webhooks. There, add endpoints and enable the desired events or edit existing configurations.

Webhook Processing

Yaspa uses real time webhook notifications to provide transaction status updates and insights payloads to merchant servers. It is critical that any business operation related to a payment, such as crediting an account for a pay-in or decrementing an account following a payout, is triggered by webhooks rather than redirects. Webhooks are considered a mandatory integration component.

Yaspa sends webhooks as signed HTTPS POST requests. Upon receipt,

  1. Verify the webhook signature according to the protocol below.
  2. Acknowledge receipt by responding HTTP 200 OK. If Yaspa does not receive a response, or the response is an error code such as 429, 503, or 504, the webhook service will retry.
  3. Handle according to the operation corresponding to the event. Webhooks include an idempotent ID header as well as merchant-configurable parameters such as reference for merchant server duplicate handling and mapping to merchant-initiated requests.
⚠️

Warning

Any Yaspa webhook may contain additional or optional parameters not explicitly listed in these documents or shown in examples. It is critically important that webhook handlers not use strict mode parsing on the examples provided in the product-specific webhook sections or samples from testing.

As webhooks may be retried, ensure that duplicate notifications are handled gracefully.

Verifying Webhooks

Yaspa signs all webhooks using a Yaspa private key before the message is sent. Merchants can verify that the webhook is authentic, meaning that it originated from Yaspa and was not altered in transit, using the following procedure:

  1. Obtain the Yaspa Public Signing Key for your region and environment:

    EnvironmentPublic key URL
    EU Productionhttps://api.yaspa.com/v2/merchant/citizen-signing-public-key
    EU Testhttps://testapi.yaspa.com/v2/merchant/citizen-signing-public-key
    US Productionhttps://api.us.yaspa.com/v2/merchant/citizen-signing-public-key
    US Sandboxhttps://api.sandbox.us.yaspa.com/v2/merchant/citizen-signing-public-key
  2. Decode the public key to UTF-8 from Base64

  3. Generate a public key using the decoded key extracted from step 2

  4. Extract the webhook body and the webhook-signature header and verify the result using the public key

A full worked example is available within the Recipes.

Webhook IP Whitelisting

Yaspa will send webhooks to the merchant server from a set range of IPs. Merchants can choose to only allow Yaspa webhooks from these IPs. Yaspa integration managers will provide a range of IPs to merchants upon request as part of onboarding.




Did this page help you?