Fetch Payment Intent
GET/payment_intents/:id
Retrieve a payment intent and its current status.
Requires the secret key — a publishable key cannot read an intent, since the
response includes the client_secret.
Request
Path Parameters
ID of the payment intent to fetch.
Responses
- 200
- 401
- 403
- 404
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- 1.00 SAR = 100
- 1.00 KWD = 1000
- 1 JPY = 1
created— awaiting fulfillment. Fulfillable untilexpires_atpasses.fulfilled— the intent was used to create a payment. Whether that payment was approved or declined is tracked on the payment, not here.canceled— canceled before use; theclient_secretno longer works.
Unique identifier of the payment intent.
Possible values: >= 100
A positive integer representing the payment amount in the smallest currency unit.
Examples:
ISO-4217 three-letter currency code.
Possible values: [created, fulfilled, canceled]
The intent's own lifecycle, not the payment's outcome.
Expiry is not a status. An intent past its expires_at stays created but can no
longer be fulfilled or canceled.
Possible values: Value must match regular expression ^pi_secret_
Single-use token that authorizes fulfillment of this intent. Pass it to your frontend and treat it as a credential — it is all a browser needs, alongside your publishable key, to create this one payment.
Fulfillment deadline. Set automatically to one hour after creation.
Date and time when the intent was fulfilled. null until then.
{
"id": "8f4d1c3e-6a52-4f0b-9a1e-2c7b5d8e0f31",
"amount": 100,
"currency": "SAR",
"description": "Order",
"callback_url": "https://example.com/checkout/payer-return",
"status": "created",
"client_secret": "pi_secret_7Kq2mXbN9vT4wPzR1sYcHdLjF6aGuE8oQ3iK5nB0xVtZrWyM",
"expires_at": "2024-07-29T15:51:28.071Z",
"fulfilled_at": "2024-07-29T15:51:28.071Z",
"created_at": "2024-07-29T15:51:28.071Z"
}
Invalid authorization credentials
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [authentication_error]
Possible values: [Invalid authorization credentials]
{
"type": "authentication_error",
"message": "Invalid authorization credentials",
"errors": null
}
The request was not authenticated with the secret key.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [api_error]
Possible values: [User not authorized]
{
"type": "api_error",
"message": "User not authorized",
"errors": null
}
Payment intent not found.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [record_not_found]
{
"type": "record_not_found",
"message": "The <object type> record you were looking for was not found.",
"errors": null
}