Why Instant Payment Notifications
All payment-related transactions (and some non-payment-related) requests on Xente are processed asynchronously. This is because most transactions require user approval and may take time to complete. Below is how we process transactions:- You POST a transaction to Xente.
- We queue it up.
- We process the transaction - this might involve user approval.
- We call back your webhook to notify you of the status of the payment.
- You respond with an HTTP OK that you have received the notification and we commit the payment as complete.
Handling Instant Payment Notification (IPN)
When it comes to handling Instant Payment Notification (IPN), there are a few key steps for you to follow:- Set up an IPN URL: Create an endpoint on your server to receive IPN messages. This URL should be capable of handling incoming POST requests.
- JSON parsing: Ensure that your IPN URL can parse JSON data. This means extracting relevant information from the incoming request payload.
- Response status: If the JSON parsing is successful, make sure your IPN URL responds with a 200 OK status code. This lets the sender know that the notification was received and processed correctly.
- Transaction completion: Remember that a transaction is only marked as complete when your system receives a successful response from the IPN URL.
Response message
Key | Type | Description |
---|---|---|
TransactionId | string | The transaction Id of the transaction. This was returned when you made the transaction request. |
AccountId | string | Your account Id |
createdOn | string | Date when request was received and processed on your end |
SubscriptionId | string | Your subscription Id |
ResponseCode | string | A description of status |
RequestId | string | The request Id that was sent in the request. |
ReferenceId | string | ReferenceId of the Transaction from your end. Can be same as requestId |
ResponseMessage | string | A description of status from your end |
Secure your Instant Payment Notifications (IPN) endpoint
Your Instant Payment Notifications (IPN) endpoint will receive transaction confirmations from Xente, so it’s important to ensure that it is secure. To secure the IPN, we will:- IP whitelisting: As an added layer of security, whitelist the following IPs: 52.48.24.237 and 34.252.29.119