Postbacks
Postbacks
Postbacks are real-time HTTPS messages that PaymentExpress sends to your system immediately after a payment is processed. They keep your records in sync with actual outcomes across your payment solutions. Your endpoint acknowledges each message, allowing PaymentExpress to determine whether to retry or consider the delivery complete.
Overview
A postback is an HTTP POST request from PaymentExpress to a URL you provide. The payload is JSON describing the completed transaction.
Your endpoint must return a small JSON response that signals success or the type of error encountered. Retries occur for non-permanent failures.
Postbacks complement, but do not replace, Reconciliation Files for end-of-day balancing.
How Postbacks Work
- Payment is successfully processed by PaymentExpress.
- PaymentExpress posts JSON to your configured URL with key identifiers and amounts.
- Your endpoint responds with a JSON body indicating the status, as described in the response format below.
- If the response is non-200, contains invalid JSON, or indicates a transient error, PaymentExpress retries according to the environment configuration.
- Retries continue until the delivery succeeds or the message is considered failed.
PermanentErrorindicates that the message should not be retried.
Access Control Note
Please let us know which systems will receive postbacks so we can grant access and be notified of any destination changes. We need the hostnames and/or IP addresses for the destinations where postbacks will be sent. Without this notice, postbacks will fail to send.
Configure Where Postbacks Go
You can specify a per-transaction postback URL during cart creation using request.resultUrls.postback. This works for Online, In-Person, and IVR carts.
Postback Request Format
PaymentExpress sends a JSON body with the following base fields. Additional metadata included during cart creation may also be echoed back.
timestamp: The RFC 3339 time when the transaction was processed.clientTransactionId: Your unique ID from the cart handoff.paymentId: The unique identifier for the payment in PaymentExpress.tenderType: The payment method used, such asCreditCardoreCheck.primaryAmount: The amount remitted to you, excluding fees, represented as a string with two decimal places.feeAmount: The fee charged to the customer, represented as a string with two decimal places.
Example Request
{
"timestamp": "2025-10-21T08:34:32Z",
"clientTransactionId": "F45E063E-063B-FC1B-AAA2-FA35803C7D5F",
"paymentId": "F6039302747",
"tenderType": "CreditCard",
"primaryAmount": "64.88",
"feeAmount": "1.95"
}Postback Response Format
Your endpoint must return HTTP 200 with a small JSON body containing a status value.
The status field is required and must be one of the following values:
Updated: Success; your system saved the update.Dupe: You already processed this message. This is still considered successful.Error: A transient failure occurred, such as a database issue. PaymentExpress will retry. Include anerrorMessage.PermanentError: A permanent condition prevents the update. PaymentExpress will not retry.
The errorMessage field is optional and provides context for a non-success status.
Success Example
{
"status": "Updated"
}Transient Error Example
{
"status": "Error",
"errorMessage": "There was a failure communicating with the database."
}Note: A postback is considered failed and will be retried if your endpoint returns a non-200 status, invalid JSON, or valid JSON that signals a non-permanent error.
Error Handling Scenarios
Duplicate Delivery
- Symptom: You receive the same
paymentIdagain. - Action: Safely return
Dupeafter verifying that you already stored the record.
Temporary Backend Failure
- Symptom: A database connection issue prevents persistence.
- Action: Return
Errorwith anerrorMessageso PaymentExpress retries.
Permanent Mismatch
- Symptom: The referenced
clientTransactionIddoes not exist in your system, for example, because it has been purged. - Action: Return
PermanentErrorto stop retries and open a manual investigation.
Non-200 Response or Invalid JSON
- Symptom: Your service times out or returns HTML.
- Action: Fix the endpoint. PaymentExpress will retry according to the configuration.
Updated 14 days ago
