Paytia API exception handling
The webhooks we send when something goes wrong mid-payment — the customer rejects the amount, the call drops, the card fails. Here's each case and what lands on your endpoint.
Paytia API Exception Handling
The Paytia API services provide status update webhooks to track processes and status changes. These updates include standard API posts as well as exception handling for telephony-related processes. Below are details about specific scenarios and their corresponding webhooks:
Confirming the Payment Amount
- Customer Confirms Amount is Correct
- Webhook Sent:
payment_stage=amount_verify&reference_id=reference_id_is_number_106&amount_verify=accepted
- Customer Rejects Amount
- Webhook Sent:
success=0&reference_id=reference_id_is_number_113
Call Leg Drops
Customer Ends the Call
- Webhook Sent:
success=0&reference_id=ref_new34_f1Ta11234521211&callhangup=customer - Explanation: This indicates the customer has disconnected the call.
Agent Ends the Call
- Webhook Sent:
success=0&reference_id=ref_new34_f1Ta11234521211121&callhangup=merchant - Explanation: This indicates the agent has disconnected the call.
Payment Session Resets
Customer Presses
*to Abort- Webhook Sent:
success=0&reference_id=ref_new34_f1Ta112345212118&custabort=1 - Explanation: The customer reset the payment session and is back in communication with the agent.
Agent Presses
*to Abort- Webhook Sent:
success=0&reference_id=ref_new34_f1Ta112345212118&agentabort=1 - Explanation: The agent reset the payment session and is back in communication with the customer.
Note
In scenarios where the session resets (via * key) or a call leg drops, the payment request should be considered as failed. A new payment session must be initiated with a fresh uniqueID.
Agent/User Licences and Assigned Payment Types
If an API request includes an agentid that lacks the necessary rights for the specified transaction_flag, Paytia will return an error in the statusDescription field.
Sample API Error Response
{
"httpStatus": false,
"reference_id": "reference_id_is_number_144",
"status": {
"statusCode": 400,
"statusDescription": "The agent you are using doesn't have the right to use transaction type 3."
}
}
- Impact: The agent will not be able to proceed with the payment if rights are not assigned.
- Resolution: User rights can be managed via the Paytia Administration Portal under
Administer Users > Users. Click theEditbutton to assign the necessary rights.
Managing Licences and Rights
- Go to Administer Users > Users.

- Select the user from the list and click the Edit button.
- Update the following settings:
- Menu Rights: Control which menus the user can access.
- Licence Rights: Assign payment types and permissions based on active licences.

For any additional configurations or support, contact your Paytia account administrator.
More in API
Paytia API services
Three API versions, depending on how much of the flow you want to control yourself. This is the overview of what each does and which one to pick.
Paytia development - embedded iframe events
If you embed our checkout rather than redirecting, we send postMessage events to your page so you can resize the frame and react to the outcome. These are separate from webhooks.
Paytia Proxy Gateway
The Proxy Gateway posts captured payment data to your own endpoint as JSON you define. Nothing is hard-coded, so you shape the payload to whatever's waiting on the other end.
Webhook request button
The Webhook Request button shows every webhook tied to one call or transaction, in order. It's the quickest way to see what your system was actually sent.
Webhooks sent from Paytia to API users for the payment capture IVR flow
What we post back at each stage of an IVR payment, and how your reference_id is carried through every webhook so you can match them up.
API details
The API Details View exposes the internal exchanges between Paytia's telephony and API services. It's a troubleshooting tool — here's how to open it and how to read what's there.
Still need help?
Our support team is here to help. Submit a ticket and we'll get back to you within one business day.