Skip to main content
GET
/
v1
/
payment_intents
List PaymentIntents
curl --request GET \
  --url https://api.leanrails.com/v1/payment_intents \
  --header 'Authorization: Basic <encoded-value>'
{
  "object": "list",
  "data": [
    {
      "id": "pi_xxx",
      "object": "payment_intent",
      "amount": 2000,
      "currency": "usd",
      "status": "requires_payment_method",
      "created": 1234567890,
      "livemode": false,
      "amount_received": 2000,
      "capture_method": "automatic",
      "confirmation_method": "automatic",
      "customer": "cus_xxx",
      "payment_method": "pm_xxx",
      "description": "<string>",
      "metadata": {},
      "merchant_id": "mer_xxx",
      "client_secret": "pi_xxx_secret_xxx",
      "last_payment_error": {
        "type": "payment_error",
        "code": "<string>",
        "message": "<string>"
      },
      "charges": {
        "object": "list",
        "data": [
          {}
        ],
        "has_more": true
      },
      "canceled_at": 1234567890,
      "cancellation_reason": "<string>"
    }
  ],
  "has_more": true,
  "url": "/v1/payment_intents",
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

X-API-Version
string

Override the API version for this request.

Query Parameters

limit
integer
default:10

Number of objects to return (1-100).

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination. The ID of the last object in the previous page.

ending_before
string

Cursor for backward pagination. The ID of the first object in the previous page.

Response

A list of PaymentIntents.

object
enum<string>
required
Available options:
list
data
object[]
required
has_more
boolean
required
url
string
required
Example:

"/v1/payment_intents"

next_cursor
string | null