Retrieve a PaymentIntent
GET
/v1/payment_intents/{id}Retrieves the details of a PaymentIntent that has previously been created.
Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.
请求参数
Path Params
id
string
required
示例代码
Responses
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
object {0}
Example
{
"id": "pi_1604012360740110336",
"object": "payment_intent",
"created": 1671261323000,
"currency": "USD",
"amount": 10,
"status": "succeeded",
"description": "product description",
"metadata": {
"key1": "value1"
},
"livemode": false,
"shipping": {
"address": {
"city": "city",
"country": "US",
"line1": "XX mansion",
"line2": "XX Town",
"state": "California",
"postal_code": "xxx xxx"
},
"carrier": null,
"name": "tom",
"phone": "xxxx",
"tracking_number": null
},
"customer": null,
"quantity": 2,
"invoice": null,
"merchant_user_id": "123456",
"merchant_order_id": "Order112344343",
"client_secret": "pi_1604012360740110336_secret_YYFHuk8Lago3RSqjbVFe68AA",
"last_payment_error": null,
"next_action": null,
"payment_method_types": "[\"wechat_pay\",\"alipay\",\"card\"]",
"receipt_email": null,
"cancel_at": "",
"cancellation_reason": null,
"confirmation_method": "automatic",
"payment_method_options": "{\"card\":{\"request_three_d_secure\":\"auto\",\"capture_method\":\"automatic\"}}",
"3ds_status": null,
"amount_capturable": null,
"return_url": "https://your.website",
"payment_method": "pm_1604012357044928512",
"amount_received": null,
"capture_method": "automatic"
}
Last modified: 9 个月前