Skip to main content
Exception handling

When the call doesn't go to plan

Phone payments fail in ways a web form never does. The customer rejects the amount, someone hangs up, or someone presses * halfway through. Paytia reports each one on your webhooks with the reference_id, so you can tie it back to the request.

API reference menu

Telephony exception webhooks

All of these arrive form-encoded, like the other stage and outcome posts:

ScenarioWebhook
Amount confirmed correctpayment_stage=amount_verify&amount_verify=accepted
Amount rejectedsuccess=0&reference_id=…
Customer ends the callsuccess=0&callhangup=customer
Agent ends the callsuccess=0&callhangup=merchant
Customer presses * to abortsuccess=0&custabort=1
Agent presses * to abortsuccess=0&agentabort=1

Treat a reset or a dropped leg as failed

When a session resets (someone pressed *) or a call leg drops, mark that payment request as failed. There's no resuming it. Start a new payment session with a new reference_id. Paytia rejects a reused one with 208 Reference ID Already Exist.

Amount verification

The customer hears the amount and presses 1 to confirm it. You'll get amount_verify=accepted and the flow carries on. If they reject it, Paytia posts success=0 and the session ends, so start again with a new reference_id.

Mid-call scenarios to listen for

  • The cardholder rejects the amount. Paytia posts success=0 and the session ends.
  • After a first payment is taken, the agent dials *729 for another one. The cardholder goes on hold and doesn't come off it automatically.
  • The cardholder presses *. The IVR reconnects the call to the agent.
  • The agent presses *. The call reconnects with the customer.

Agent rights errors

This one arrives on the API response, not a webhook. If the agent_id doesn't have the rights for the transaction_flag you sent, you get a 400 with the reason in statusDescription. Fix it in the Administration Portal under Administer Users → Users, by setting the agent's Menu Rights and Licence Rights. Error codes →

Related

Ready to build with Paytia?

The docs are open. Keys are gated — drop us a line and we'll issue sandbox credentials so you can try every flow against a real endpoint.