---
title: "Get a payment intent"
description: "With its attempts."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/payment-intents/get-a-payment-intent"
---
# Get a payment intent

> With its attempts.

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

Returns the intent plus `attempts[]`, oldest first — the “Attempt 1 / Attempt 2 / …” history.

The intent carries the SAME joined context as a list row (customer, gateway account, card), and each attempt carries the instrument it was tried with — per attempt, because a declined buyer can retry on a different card. A voided intent also carries `voided_transaction`, the `payment_reversal` the release booked.

## 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>

## 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>
        customer
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's id (cus_…).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer_name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's first name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer_first_name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The Customer Information card is First/Last name, not a display name — and a display name cannot be split back into them.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer_last_name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's last name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer_email
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's email.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer_phone
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's phone number.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gateway_key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The gateway that processes the payment.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gateway_account
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A business can hold several accounts on one gateway (“Stripe / Stripe-1”), so the key alone names nothing.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gateway_account_label
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The label of the gateway account.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        payment_method_brand
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The card brand used.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        payment_method_last4
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The last four digits of the card used.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        attempts
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The attempts made for this intent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        voided_transaction
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The <code>
        payment_reversal
      </code>
      
       transaction the void booked, correlated by <code>
        transactions.payment_intent_id
      </code>
      
      . Null for every intent that was not voided.
    </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>
        404
      </code>
    </td>
    
    <td>
      No such payment intent
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/payment_intents/pi_XXXXXXXXXXXX01" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</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,
  "customer": "cus_XXXXXXXXXXXX01",
  "customer_name": "Maya Castillo",
  "customer_first_name": "Maya",
  "customer_last_name": "Castillo",
  "customer_email": "maya@example.com",
  "customer_phone": "+1 415 555 0100",
  "gateway_key": "stripe",
  "gateway_account": "gwa_XXXXXXXXXXXX01",
  "gateway_account_label": "Stripe (main account)",
  "payment_method_brand": "visa",
  "payment_method_last4": "4242",
  "attempts": [
    {
      "object": "payment_attempt",
      "id": "pia_XXXXXXXXXXXX01",
      "attempt_number": 0,
      "status": "inited"
    }
  ],
  "voided_transaction": null
}
```

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

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


## Sitemap

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