Hosted Checkout
- 服务地址
https://checkout.psp.example.comExample host; obtain the actual Checkout host from PSP- 认证
- 无需凭证
- 版本
- 1.0.0
- OpenAPI
- 下载规范
Consumer checkout for an existing Gateway PaymentIntent. Use the psp_checkout_url returned by the Invoice API. Checkout access requires a token bound to the payment and tenant in X-Checkout-Session-Token or ?t=. Merchant Gateway credentials do not apply.
Hosted Checkout
Section titled “Hosted Checkout”Read hosted payment and saved instructions
Section titled “Read hosted payment and saved instructions”路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
payment_id |
string<uuid> | 必填 | — |
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
t |
string | 可选 | Checkout token; provide this parameter or X-Checkout-Session-Token. |
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
X-Checkout-Session-Token |
string | 可选 | Checkout token; provide this header or t. |
请求示例
curl -X GET 'https://checkout.psp.example.com/checkout/hosted/payments/{payment_id}'响应
Hosted payment detail and instructions
Read payment status
Section titled “Read payment status”路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
payment_id |
string<uuid> | 必填 | — |
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
t |
string | 可选 | Checkout token; provide this parameter or X-Checkout-Session-Token. |
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
X-Checkout-Session-Token |
string | 可选 | Checkout token; provide this header or t. |
请求示例
curl -X GET 'https://checkout.psp.example.com/checkout/hosted/payments/{payment_id}/status'响应
Payment status
Read the validated return redirect
Section titled “Read the validated return redirect”路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
payment_id |
string<uuid> | 必填 | — |
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
t |
string | 可选 | Checkout token; provide this parameter or X-Checkout-Session-Token. |
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
X-Checkout-Session-Token |
string | 可选 | Checkout token; provide this header or t. |
请求示例
curl -X GET 'https://checkout.psp.example.com/checkout/hosted/payments/{payment_id}/success-redirect'响应
Redirect decision
Submit hosted credit card payment
Section titled “Submit hosted credit card payment”路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
payment_id |
string<uuid> | 必填 | — |
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
t |
string | 可选 | Checkout token; provide this parameter or X-Checkout-Session-Token. |
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
X-Checkout-Session-Token |
string | 可选 | Checkout token; provide this header or t. |
请求体 application/json · 必填
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
card_token |
string | 可选 | — |
card_cvv |
string | 可选 | — |
card_info |
object | 可选 | — |
card_info.card_number |
string | 必填 | — |
card_info.cvv |
string | 必填 | — |
card_info.expiry_month |
integer | 必填 | ≥ 1 · ≤ 12 |
card_info.expiry_year |
integer | 必填 | — |
card_info.cardholder_name |
string | 必填 | — |
billing_address |
object | 可选 | — |
payer_info |
object | 可选 | — |
payer_info.name |
string | 可选 | — |
payer_info.email |
string<email> | 可选 | — |
payer_info.phone |
string | 可选 | — |
require_3ds |
boolean | 可选 | — |
请求示例
curl -X POST 'https://checkout.psp.example.com/checkout/creditcard/payment-intents/{payment_id}/pay' \ -H 'Content-Type: application/json' \ -d '{ "card_token": "string", "card_cvv": "string", "card_info": { "card_number": "string", "cvv": "string", "expiry_month": 1, "expiry_year": 0, "cardholder_name": "string" }, "billing_address": {}, "payer_info": { "name": "string", "email": "[email protected]", "phone": "string" }, "require_3ds": false }'响应
Payment submitted
Complete card 3DS authentication
Section titled “Complete card 3DS authentication”路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
payment_id |
string<uuid> | 必填 | — |
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
t |
string | 可选 | Checkout token; provide this parameter or X-Checkout-Session-Token. |
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
X-Checkout-Session-Token |
string | 可选 | Checkout token; provide this header or t. |
请求体 application/json · 必填
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
authorization_id |
string<uuid> | 必填 | — |
transaction_id |
string | 必填 | — |
auth_value |
string | 必填 | — |
eci |
string | 必填 | — |
cres_nonce |
string | 必填 | — |
请求示例
curl -X POST 'https://checkout.psp.example.com/checkout/creditcard/payment-intents/{payment_id}/complete-3ds' \ -H 'Content-Type: application/json' \ -d '{ "authorization_id": "00000000-0000-7000-8000-000000000000", "transaction_id": "string", "auth_value": "string", "eci": "string", "cres_nonce": "string" }'响应
3DS completed