API Reference

Configuring Webhooks and Callbacks

Use the Pay1st Console to generate the Webhooks and Callbacks for your integrations

Used in Gateway Integration

Overview

Webhooks and Callbacks are configured in order to redirect to the Partner’s servers once a payment’s status has been concluded. The following differences exist

  • Webhooks are typically sent to a Partner's backend server
  • Callbacks are typically used to redirect a Partner's customer in order to communicate payment status

List of Webhooks and Callbacks

The following table describes the Webhook and Callback configuration required for a Gateway Integration.

NameTypeDescription
Webhook URLStringThis is used in order to send payment status updates to the Partner backend server. The payload sent to this URL is called Payment Webhook Events
Success Callback URLStringAfter a successful payment, this URL will be used as the default URL when redirecting a customer
Failure Callback URLStringAfter a failed payment, this URL will be used as the default URL when redirecting a customer
Pending Callback URLStringWhen a payment is in a pending status, this URL will be used as the default URL when redirecting a customer
Cancel Callback URLStringAfter a cancelled payment, this URL will be used as the default URL when redirecting a customer

Payment Webhook Event List of Fields

The table below lists all the fields available in payment webhook events

NameTypeMandatoryDescription
partnerIdNumberYA numerical identifier of the Partner
partnerCodeStringYThe unique code of the Partner. This should match the code configured in the Pay1st console
partnerReferenceStringYThe unique reference sent by the Partner in the Create Payment Request
referenceStringYThe Pay1st reference of the Payment
orderAmountNumberYThe amount that was sent in the Create Payment Request
currencyCodeStringYThe currency code that was sent in the Create Payment Request
countryCodeStringYThe country code that was sent in the Create Payment Request
sourceStringYThe originating source of the Payment
platformStringYThe device platform used for the Payment. This will set to WEB
ipAddressStringYThe IP Address of the customer who made the Payment
createdDateStringYThe timestamp (in ISO-8601 format) that this Payment was created in the Pay1st Gateway
updatedDateStringYThe timestamp (in ISO-8601 format) of the last time that this Payment was updated by the Pay1st Gateway
statusStringYThe current status of this Payment. Possible values are: ABANDONED, CANCELLED, CHARGEBACK, FAILED, NEW, PAY_OFFLINE, PENDING, PENDING_INVESTIGATION, READY, REFUND, SEND_BIRTHDAY, SEND_PHONE, SEND_PIN, SEND_OTP, SEND_VALIDATION_TOKEN, SUCCESSFUL, VALIDATED
messageStringYThis contains the response message of the PSP used for the Payment
statusCodeNumberYThe status code of the Payment
customerIdNumberYThe customer identifier of this Payment
paymentMethodStringYThis is the payment method that has been used for the Payment
taxPercentageNumberYThe percentage of the Payment that represents tax
partnerWebhookUrlStringYThe partner webhook URL that was sent in the Create Payment Request