Expire Session
POST
/v1/checkout/sessions/{id}/expire
/v1/checkout/sessions/{id}/expire
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
id
string
required
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/checkout/sessions//expire'
Responses
🟢200成功
application/json
Body
code
string
required
msg
string
required
data
object (Session)
required
sessionId
string
required
paymentIntentId
string
required
clientReferenceId
string
自定义id
currency
string
币种
amount
number
金额
>= 1
status
enum<string>
required
Allowed values:
opencompleteexpired
subject
string
主题
description
string
描述
customerId
string
optional
expiresAt
integer
过期时间
successUrl
string
支付成功跳转url
cancelUrl
string
取消跳转url
url
string
收银台url
created
integer
创建时间
paymentMethodOptions
object
付款方式配置
Example
{
"code": "success",
"msg": null,
"data": {
"sessionId": "cs_test_2025031",
"paymentIntentId": "pi_test_202503110",
"clientReferenceId": "183",
"currency": "USD",
"amount": 20,
"status": "expired",
"subject": "test",
"description": "test des",
"customerId": "cus_test_20250306",
"expiresAt": 1741768596319,
"successUrl": "https://test.com/",
"cancelUrl": "https://test.com",
"url": "https://sandbox-checkout.yobopay.com/pay/cs_test_2025031",
"created": 1741682196321,
"paymentMethodOptions": {
"card": {
"setupFutureUsage": "on_session"
}
}
}
}
Modified at 2025-03-21 06:12:09