Obtain a response to an initial or scheduled payment using the webhook
To get the state of an order, you can use the BillPro API to get the order. See Get order.
But for a more immediate response, it is also possible to get the results of a transaction from the payment gateway webhook. From the webhook notifications, you can get the results of a checkout transaction.
BillPro Customer Service configures the webhook for your merchant in the payment gateway.
BillPro payment gateway
This documentation applies to payments made with the BillPro payment gateway. It does not apply to payments made with Stripe
Payment gateway webhook documentation
Read the documentation about integrating with the payment gateway's webhook at https://cardcorp.docs.oppwa.com/.
Here you will find important information about the webhook, such as the basic payload format, retries, decryption, and processing peak loads.
Respond to the webhook notifications
When your system successfully receives a webhook notification, it must respond with a 200
status code, so the gateway will stop any retries. If the gateway does not successfully receive the 200
status code response, then it will retry sending the notification.
Identify a payment in the webhook notifications
Check the type
is PAYMENT
or REGISTRATION
, and then check the payload
as follows.
Process notifications if the paymentType
has a value of DB
, RF
, RG
or PA
.
If the value of result.code
is 000.000.000
, the payment is approved. Otherwise, it is declined.
The id
is the unique identifier of the transaction. You may receive more than one notification for each transaction because the webhook will send retries until it successfully receives a 200
status code.
If a payment is declined, then the customer may try to pay again, and the customer's retry will have a different id
.
Identify the order in the webhook notifications
You can identify the transaction in the webhook responses using BillPro's merchant order_id
and merchant customer_id
. The merchant customer ID is part of a customer object that has more attributes. BillPro also uses its own unique system identifier for the order, called the ZUID
, which is sent as the merchant transaction ID. Here is an example of the format of the attributes.
“merchantInvoiceId”: “ABCD123123”
"customer: {... "merchantCustomerId":"DC12341234" ...}
"merchantTransactionId”: “ZUID-123”
These parameters also appear in the customParameters
attribute.
Get the results of a repeated payment
To find out more about how to use the webhook to get the results of repeated payments, please contact BillPro Customer Service.