Webhook Events

Webhooks serve as a mechanism that enables real-time communication between different your application and Pay Advantage

Webhooks allow you to receive Pay Advantage events to endpoints that you host. The current list of events are detailed below. Please check from time to time as these will be updated occasionally.

πŸ“˜

Release date for refund and chargeback webhook: 18th June 2024

If you need to manage chargebacks, you can no longer rely on identifying failed payments. Instead, you will need to listen to the new refund webhook. The data payload will indicate whether the webhook pertains to a refund or a chargeback based on the type.

Webhook Event Data

Webhook Events now include the resource that the event relates to by including the Data attribute in the request body. The schema exactly matches the PayAdvantage API for each type of resource. For example, if a payment.created event occurs, the Data attribute will include the payment that was created, and it will be identical to the data you would have received by making a request to the API by using the ResourceUrl.

It is important to note that when processing Webhook Events, the Data attribute contains a copy of the resource from a point in time when the event was sent, not when the event occurred. Under most scenarios this shouldn't pose a problem, you should just be aware that the copy of the resource is not a point in time capture from when the event occurred.

[
    {
        "Code": "1FFDB5FA",
        "MerchantCode": "PA12345",
        "DateCreated": "2024-04-02T15:38:02.487+00:00",
        "DateUpdated": "2024-04-02T15:38:08.527+00:00",
        "Event": "payment.created",
        "ResourceCode": "9SFUZA",
        "ResourceUrl": "https://test.payadvantage.com.au/payments/9SFUZA",
        "EndpointCode": "TSFUZA",
        "EndpointUrl": "http://mysite.com/pawebhook",
        "Status": "sending",
        "Data": {
            "Code": "9SFUZA",
            "DateCreated": "2024-04-03T02:37:54.640+11:00",
            "DatePaid": "2024-04-03T02:37:54.640+11:00",
            "DateFailed": null,
            "DateClears": "2024-04-04T00:00:00.000+11:00",
            "DateSettled": null,
            "DateUpdated": "2024-04-03T02:37:54.640+11:00",
            "ReadyToSettle": true,
            "FailCode": null,
            "FailReason": null,
            "PaymentType": "realtime_credit_card",
            "Amount": 34,
            "AmountIncFees": 35.34,
            "AmountRefunded": 0,
            "Customer": {
                "Code": "PF2UZA",
                "Name": "John Davies"
            },
            "BPAYReference": null,
            "ExternalID": null,
            "ExternalReference": null,
            "SettlementCode": null,
            "DDR": null
        }
    }
]

List of supported Webhook Events

Endpoint Creation

All events in this category return a Webhook Endpoint in the Data attribute.

EventDescriptionName
Endpoint ArmedFired every time an endpoint passes the arming process.
The arming process is initiated when an endpoint is registered or re-registered with Pay Advantage.
webhook_endpoint.armed

Payments

All events in this category return a Payment in the Data attribute.

EventDescriptionName
Payment CreatedSent every time a payment is created.payment.created
Payment FailureSent every time a payment fails.payment.failed
Payment SettledSent every time a payment settles. Please note that a payment can still fail after it has settled due to a chargeback.payment.settled

Customers

All events in this category return a Customer in the Data attribute.

EventDescriptionName
Customer CreatedSent every time a new customer is created.customer.created

Direct Debits

All events in this category return a Direct Debit in the Data attribute.

EventDescriptionName
Direct Debit Request CreatedSent every time a direct debit requests is created.ddr.created
Direct Debit Request DeletedSent every time a direct debit requests is deleted.ddr.deleted
Direct Debit Request AuthorisedSent every time a direct debit requests is authorised by a customer.ddr.authorised
Direct Debit Request ActivatedSent every time a direct debit requests is approved by Pay Advantage.ddr.activated
Direct Debit Request RejectedSent every time a direct debit requests is rejected.ddr.rejected
Direct Debit Request CancelledSent every time a direct debit requests is cancelled.ddr.cancelled
Direct Debit Request PausedSent every time a direct debit requests is paused.ddr.paused
Direct Debit Request ResumedSent every time a direct debit requests is resumed.ddr.resumed
Direct Debit Request CompletedSent every time a direct debit requests is completed. This occurs when the direct debit is for a fixed amount and all installments are completed.ddr.completed
Direct Debit Request Re-activatedSent every time a direct debit requests is re-activated. This usually occurs when a payment fails after the direct debit has completed.ddr.reactivated

Refunds

πŸ“˜

Implemented on the 18th June 2024

All events in this category return a Refund in the Data attribute.

EventDescriptionName
Refund CreatedSent when a refund has been created. This can be created by the merchant or by support.refund.created
Refund ProcessedSent once the refund has been processed and sent to the customer. This webhook is also sent to notify merchants of a chargeback.
NOTE: Chargeback payments will not trigger any other refund webhook as there is no lifecycle associated with a chargeback. The customers bank will simply advise Pay Advantage that the money has already been provided back to the customer.
refund.processed
Refund FailureSent every time a refund fails.refund.failed
Refund CancelledSent every time a refund is cancelled.refund.cancelled

Webhook Retention Time

It is very important to understand that Webhook Events are only short lived. Once an event has been accepted by all active Endpoints it is eligible for deletion. Any Event older than 1 month is eligible for deletion; even if it has not been accepted.

Viewing webhooks from the UI

To manage and view your webhooks, log into the Pay Advantage dashboard. Within the dashboard, you can monitor the status of each webhook, ensuring they are functioning as expected. Additionally, you can access and review the data sent with each webhook, allowing you to troubleshoot any issues or verify the information being transmitted. This comprehensive overview helps maintain smooth operations and provides transparency for all webhook activities.