Expire a CheckoutSession
Expire a CheckoutSession resource.
Endpoint
POST /checkout_sessions/:id/expire
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --request POST --location 'https://api.payrexhq.com/checkout_sessions/<ID of a CheckoutSession resource>/expire' \
-u replace_with_secret_api_key:
const client = require('payrex-node')('insert your PayRex Secret API key.');
const checkoutSession = await client.checkoutSessions.expire(
// Checkout Sesssion ID to expire.
'<ID of a CheckoutSession resource>',
)
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$checkoutSession = $client->checkoutSessions->expire(
// Checkout Sesssion ID to expire.
'<ID of a CheckoutSession resource>'
);
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
checkout_session = client.checkout_sessions.expire(
# Checkout Sesssion ID to expire.
'<ID of a CheckoutSession resource>'
)
client = Payrex::Client.new("insert your PayRex Secret API key.")
checkout_session = client.checkout_sessions.expire(
# Checkout Sesssion ID to expire.
'<ID of a CheckoutSession resource>'
)
Returns
Returns a CheckoutSession resource.