Collecting for a customer? Pass their party ID as
customerPartyId when creating the payment
intent and voice session.Create the voice session
Create a payment intent, then create a voice session for it.callerPhone is required. Natural texts that number a checkout link if the card keeps failing. Set returnTarget to the SIP address that receives the call afterward. Omit it to end the call instead.
Transfer the caller
Transfer the call over SIP to the returneddialUri before dialExpiresAt, which is 15 minutes after creation or sooner if the intent expires first. Natural’s agent confirms the amount, takes the card by speech or keypad, and processes the payment.
Each session accepts one call. Create a new session if the transfer fails or the session expires.
Read the result
Get the payment intent to check its status, or subscribe topaymentIntent.completed, cardPayment.succeeded, and cardPayment.failed webhooks.
Subscribe to voiceSession.completed to learn how each call finished. It fires once per session, after the call has ended and the result is known, and carries the call details. It does not mean paid. Read payment.outcome:
paid: the card was charged on the call.linkSent: voice payment did not succeed, so Natural texted the caller the checkout link. The payment intent stays open.payment.failureholds the last decline, if any.unpaid: the call ended without a payment or a link.
paymentIntent.completed. The voice session’s outcome stays linkSent.
The outcome is on the voice session as soon as it is known, before the call ends. Get the voice session if you need it before the event.
completed. Its cardPayment relationship identifies the successful payment.
View call logs and transcripts in the dashboard or through the API, with card details redacted. See Call log and transcripts.