A valid request URL is required to generate request examples{
"payment_intent": {
"id": "<string>",
"object": "payment_intent",
"merchant_id": "<string>",
"livemode": true,
"client_secret": "<string>",
"customer": "<string>",
"amount": 123,
"currency": "<string>",
"capture_method": "automatic",
"status": "requires_payment_method",
"payment_method": "<string>",
"latest_charge_id": "<string>",
"metadata": {},
"created_at": 123,
"updated_at": 123,
"setup_future_usage": "off_session",
"tokenization": {
"provider": "<string>",
"tokenization_key": "<string>"
},
"reference": "<string>"
},
"charges": [
{
"payment_context": {
"version": 1,
"channel": "<string>",
"flow": "<string>",
"wallet": "unknown",
"wallet_evidence": "unknown",
"initiated_by": "<string>",
"card_brand": "<string>",
"card_funding": "<string>",
"card_entry_method": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"checkout_session_id": "<string>",
"payment_link_id": "<string>",
"invoice_id": "<string>",
"subscription_id": "<string>",
"card_country": "<string>"
},
"payment_lifecycle": {
"attempted_at": "2023-11-07T05:31:56Z",
"dispatched_at": "2023-11-07T05:31:56Z",
"authorized_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"finalized_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"object": "charge",
"intent_id": "<string>",
"payment_method": "<string>",
"amount": 123,
"amount_refunded": 123,
"currency": "<string>",
"status": "pending",
"authorization_code": "<string>",
"settlement_batch_id": "<string>",
"settled_at": 123,
"decline_code": "<string>",
"decline_type": "<string>",
"failure_message": "<string>",
"created_at": 123,
"updated_at": 123
}
]
}{
"error": {
"code": "INVALID_REQUEST",
"message": "invalid currency"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "PAYMENT_INTENT_NOT_FOUND",
"message": "payment intent not found"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}Retrieve a payment intent
Returns the PaymentIntent. A secret key returns it with client_secret
set to null and includes its Charge history. A publishable key must pass
the intent’s client_secret as a query parameter and receives the
browser-safe fields needed to continue checkout, with no Charge history.
A valid request URL is required to generate request examples{
"payment_intent": {
"id": "<string>",
"object": "payment_intent",
"merchant_id": "<string>",
"livemode": true,
"client_secret": "<string>",
"customer": "<string>",
"amount": 123,
"currency": "<string>",
"capture_method": "automatic",
"status": "requires_payment_method",
"payment_method": "<string>",
"latest_charge_id": "<string>",
"metadata": {},
"created_at": 123,
"updated_at": 123,
"setup_future_usage": "off_session",
"tokenization": {
"provider": "<string>",
"tokenization_key": "<string>"
},
"reference": "<string>"
},
"charges": [
{
"payment_context": {
"version": 1,
"channel": "<string>",
"flow": "<string>",
"wallet": "unknown",
"wallet_evidence": "unknown",
"initiated_by": "<string>",
"card_brand": "<string>",
"card_funding": "<string>",
"card_entry_method": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"checkout_session_id": "<string>",
"payment_link_id": "<string>",
"invoice_id": "<string>",
"subscription_id": "<string>",
"card_country": "<string>"
},
"payment_lifecycle": {
"attempted_at": "2023-11-07T05:31:56Z",
"dispatched_at": "2023-11-07T05:31:56Z",
"authorized_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"finalized_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"object": "charge",
"intent_id": "<string>",
"payment_method": "<string>",
"amount": 123,
"amount_refunded": 123,
"currency": "<string>",
"status": "pending",
"authorization_code": "<string>",
"settlement_batch_id": "<string>",
"settled_at": 123,
"decline_code": "<string>",
"decline_type": "<string>",
"failure_message": "<string>",
"created_at": 123,
"updated_at": 123
}
]
}{
"error": {
"code": "INVALID_REQUEST",
"message": "invalid currency"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "PAYMENT_INTENT_NOT_FOUND",
"message": "payment intent not found"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "card_error",
"decline_code": "<string>",
"decline_type": "authorization",
"retryable": true,
"doc_url": "<string>"
}
}Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
Merchant ID when an authorized Platform acts for a connected Merchant. Omit when authenticating directly as that Merchant.
^mer_[0-9A-Za-z]{14}$Path Parameters
The payment intent id (pi_…).
Query Parameters
Required when authenticating with a publishable key; ignored for secret keys.
Response
The payment intent and, for secret-key requests, its Charge history. Publishable-key requests return an empty charges array.
A PaymentIntent and the Charge records created by its confirmation attempts.

