---
title: "Consume an authorized intent"
description: "purpose: payment — captures INTO an invoice: invoice is required, the intent’s amount and currency must equal the invoice’s amount due, and the engine books payment + double-entry ledger +…"
canonical_url: "https://twominutebilling.com/help/developers/api-reference/payment-intents/consume-an-authorized-intent"
---
# Consume an authorized intent

> purpose: payment — captures INTO an invoice: invoice is required, the intent’s amount and currency must equal the invoice’s amount due, and the engine books payment + double-entry ledger +…

<api-operation method="POST" path="/v1/businesses/{biz}/payment_intents/{pi}/consume">
<template v-slot:docs="">

**purpose: payment** — captures INTO an invoice: `invoice` is required, the intent’s amount and currency must equal the invoice’s amount due, and the engine books payment + double-entry ledger + transaction and settles it. `charge_status` reports the gateway outcome.

**purpose: setup** — no invoice and no money: pass no body. The product is the vaulted instrument, returned as `payment_method`; the zero-amount hold is then released where the gateway can void.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pi
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Payment intent id (pi_…)
    </td>
  </tr>
</tbody>
</table>

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Body

The request body is optional.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        invoice
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Required for <code>
        purpose: payment
      </code>
      
      ; must not be needed for <code>
        setup
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        client_result
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      What the gateway's browser SDK returned for a <code>
        next_action.mode: sdk
      </code>
      
       challenge, as string key/values. We send it to the gateway, which decides the outcome. A refusal answers 400 (402 on subscription create) with the gateway's reason, and the intent stays open for a retry. Rejected with <code>
        client_result_unsupported
      </code>
      
       on a gateway that takes no browser result.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        payment_intent
      </code>
      
      . One of <code>
        payment_intent
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The payment intent's id (pi_…).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        voided
      </code>
      
       is set by the void route alongside <code>
        voided_at
      </code>
      
      . One of <code>
        inited
      </code>
      
      , <code>
        in_progress
      </code>
      
      , <code>
        authorized
      </code>
      
      , <code>
        consumed
      </code>
      
      , <code>
        expired
      </code>
      
      , <code>
        voided
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        purpose
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Whether the intent takes a payment or saves a payment method. One of <code>
        payment
      </code>
      
      , <code>
        setup
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        amount_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Always 0 for a <code>
        setup
      </code>
      
       intent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        max_amount_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The mandate ceiling this <code>
        setup
      </code>
      
       intent registered with, and what a retry re-registers with. Null for <code>
        payment
      </code>
      
       intents.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The payment intent's currency (ISO-4217 code).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        attempt_count
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Payment attempts — how many times this intent has been tried at the gateway.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        last_attempt_status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Status of the NEWEST attempt. <code>
        status
      </code>
      
       above cannot express a refusal — there is no <code>
        failed
      </code>
      
       intent status, because a declined authorization leaves the intent OPEN so it can be retried — so this is what distinguishes a declined intent from one the buyer is still working through. <code>
        null
      </code>
      
       means no attempt has been made yet. One of <code>
        inited
      </code>
      
      , <code>
        requires_action
      </code>
      
      , <code>
        authorized
      </code>
      
      , <code>
        consumed
      </code>
      
      , <code>
        failed
      </code>
      
      , <code>
        voided
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        next_action
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      How the buyer completes the challenge, when one is outstanding.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        expires_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the intent expires (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        voided_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the intent was voided (ISO-8601 UTC), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        created_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the payment intent was created (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        resource_version
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      A number that goes up on every change.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        attempt
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The attempt that was made.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        charge_status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        purpose: payment
      </code>
      
       — the gateway capture outcome. Null for a setup intent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        payment_method
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        purpose: setup
      </code>
      
       — the instrument the intent existed to vault. Null for a payment intent.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Not consumable / wrong amount / missing invoice on a payment intent
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No such payment intent
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Consumed concurrently
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/payment_intents/pi_XXXXXXXXXXXX01/consume" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice": "inv_XXXXXXXXXXXX01"
  }'
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "payment_intent",
  "id": "pi_XXXXXXXXXXXX01",
  "status": "inited",
  "purpose": "payment",
  "amount_minor": 2900,
  "max_amount_minor": 2900,
  "currency": "USD",
  "attempt_count": 0,
  "last_attempt_status": "inited",
  "next_action": {
    "mode": "redirect",
    "approvalUrl": "ApprovalUrl",
    "clientSecret": "ClientSecret",
    "publishableKey": "PublishableKey",
    "checkout": {},
    "sdk": {
      "provider": "stripe",
      "params": {}
    },
    "formPost": {
      "action": "https://example.com/webhooks/billing",
      "fields": {}
    }
  },
  "expires_at": "2026-04-14T09:30:00Z",
  "voided_at": null,
  "created_at": "2026-03-14T09:30:00Z",
  "resource_version": 1,
  "attempt": {
    "object": "payment_attempt",
    "id": "pia_XXXXXXXXXXXX01",
    "attempt_number": 0,
    "status": "inited",
    "id_at_gateway": "pi_XXXXXXXXXXXX01",
    "error_code": null,
    "error_text": null,
    "trace_id": "3f6c1b9e-8a2d-4c5e-9f10-2b7d4e6a8c01",
    "span_id": "Span id",
    "created_at": "2026-03-14T09:30:00Z",
    "updated_at": "2026-03-14T09:30:00Z",
    "resource_version": 1
  },
  "charge_status": "succeeded",
  "payment_method": "pm_XXXXXXXXXXXX01"
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Not consumable / wrong amount / missing invoice on a payment intent"
  }
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such payment intent"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "conflict_error",
    "message": "Consumed concurrently"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
