> ## Documentation Index
> Fetch the complete documentation index at: https://docs.natural.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When building application code, use `@naturalpay/sdk` for TypeScript or `naturalpay` for Python.
> When operating Natural directly for a user, use the payments MCP at `https://mcp.natural.com`.
> When searching Natural documentation, use the docs MCP at `https://docs.natural.com/mcp`.
> Use the Natural CLI for terminal and CI automation.
> Use REST only for unsupported languages or when the user explicitly requests raw HTTP.
> Start integration development and testing in the sandbox. Do not use production unless the user explicitly requests it.
> For sandbox requests that require `customerPartyId`, list customers first. Reuse only the intended fixture; otherwise create a customer.
> REST and SDK amounts use integer minor units. Payments MCP amounts use decimal strings with a required currency code.

# Take a payment over voice

> Transfer a live caller to Natural's PCI-compliant agent and charge cards mid-call.

Voice allows you to take card payments in a PCI compliant manner. Voice agents typically run cloud hosted LLMs, telephony, STT/TTS, and logging, making cardholder data infamously hard to capture due to PCI-DSS standards. Voice runs a locally hosted PCI-compliant voice agent that allows inbound SIP transfers to make voice payments on. It can be configured to transfer back
to the original call or ended upon completion, with redacted transcripts available and realtime webhooks.

<Snippet file="shared/prerequisites.mdx" />

<Warning>
  Natural admits calls only from IP ranges it knows. Before your first call, email [hi@natural.com](mailto:hi@natural.com)
  the public IP ranges your voice platform signals from, and any target you transfer calls back to.
  The full SIP requirements are on the [voice sessions
  overview](/guides/concepts/voice-sessions#connecting-over-sip).
</Warning>

<Note>
  Taking the payment for a **customer**? Pass their party ID as `customerPartyId` when creating the
  intent and as `merchantPartyId` when creating the session.
</Note>

<Snippet file="shared/cents-note.mdx" />

## Create the voice session

Voice sessions are tied to payment intents. First [create a payment intent](/guides/accept/pay-by-link) for the full
total. The charge captures exactly that amount.

Use the payment intent to create a voice session via
[`POST /voice/sessions`](/api-reference/voice/create-voice-session).

<Snippet file="shared/instance-id-note.mdx" />

```bash cURL theme={null}
# NATURAL_API_KEY=ak_ntl_prod_... (the agent's key)
curl -X POST https://api.natural.com/voice/sessions \
  -H "Authorization: Bearer $NATURAL_API_KEY" \
  -H "X-Instance-ID: $(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "attributes": {
        "kind": "payment",
        "paymentIntentId": "pmi_019d0a1b2c3d4e5f60718293a4b5c6d7",
        "partnerCorrelation": "call_8842",
        "callerPhone": "+14155550123",
        "returnTarget": "sip:agent-9920@sip.partner.example.com"
      }
    }
  }'
```

<Snippet file="api-examples/voice.createVoiceSession.response.mdx" />

`callerPhone` lets Natural text the caller a checkout link if their card is refused.
`returnTarget` is the SIP URI Natural sends the caller back to when the call ends, whatever the
outcome; leave it out and Natural hangs up instead. Natural places a new call to that URI, so
put your own call identifier in it to route the caller back to the right agent.

## Transfer the caller

Place one SIP call to `dialUri` before `dialExpiresAt`, 15 minutes from creation. Natural's
agent names the business, reads the total, and takes the card by speech or keypad. When the
call ends, the agent transfers the caller to your `returnTarget`.

A session accepts one call. If the transfer fails or the window passes, create a new session
for the same intent.

## Read the result

Read the intent with
[`GET /payment-intents/{paymentIntentId}`](/api-reference/payment-intents/get-payment-intent).
A paid intent reads `completed`, and its `cardPayment` carries the card brand, last four, and
`"channel": "voice"`.

```bash cURL theme={null}
curl https://api.natural.com/payment-intents/pmi_019d0a1b2c3d4e5f60718293a4b5c6d7 \
  -H "Authorization: Bearer $NATURAL_API_KEY"
```

<Snippet file="api-examples/paymentIntents.get.response.paidByVoice.mdx" />

For the call itself, see [Call log and transcripts](/guides/voice/call-log).
