Skip to main content

Handle purchase callbacks

Walley Checkout will send a GET request with TLS to the notification URI that was provided in the initialize Checkout step for the following events:

Before you start

Set notificationUri when you initialize the checkout session. The endpoint must be reachable over HTTPS and must answer 200 OK.

Notification events​

Completed purchase​

A purchase has been successfully completed by the end customer. When you acquire checkout information the state of the Checkout has transferred to PurchaseCompleted and the invoice status is one of the values described in data.purchase.result.

Invoice status update​

An invoice has been approved or rejected by Walley's anti-fraud system (if that feature is configured on your account), or the Invoice required the end customer to digitally sign a credit agreement and this has been completed by the end customer. When you acquire checkout information the invoice status has transferred to one of the values described in data.purchase.result. If the invoice was Cancelled before the notification callback arrived, the invoice is considered Cancelled regardless of the data.purchase.result value.

If using the checkout as a Pay Link and a checkoutAbortedRedirectPageUri is provided at Initialize Checkout, a notification callback will be sent if the cancel button is called. The customer will be redirected to the redirect page and a notification will be triggered.

Idempotency and retries​

The Checkout will attempt to notify the provided notification URI multiple times with increasing backoff time until a HTTP status code 200 is received in the response. Our retry mechanism is built in a way that we guarantee at-least-once-delivery and the notification URI endpoint must therefore support being called multiple times without side effects.

We send the notification callback instantly. If your endpoint does not answer with a 200 OK status, we retry after each of the following delays, measured from the previous attempt:

  • 5 seconds
  • 10 seconds
  • 3 minutes
  • 1 hour
  • 4 hours
  • 8 hours
  • 16 hours
  • 24 hours

The last retry falls about 53 hours after the first attempt. If your endpoint has still not answered with a 200 OK status by then, we handle it manually and contact you before retrying again.