curl --request POST \
--url https://api.fintoc.com/v2/checkout_sessions/{id}/expire \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/checkout_sessions/{id}/expire"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/checkout_sessions/{id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v2/checkout_sessions/{id}/expire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/checkout_sessions/{id}/expire"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/checkout_sessions/{id}/expire")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/checkout_sessions/{id}/expire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cs_li5531onlFDi235",
"object": "checkout_session",
"amount": 350000,
"business_profile": null,
"cancel_url": "https://merchant.com/cancel",
"created_at": "2026-01-13T18:48:25Z",
"currency": "CLP",
"customer_email": "customer@example.com",
"expires_at": "2026-01-14T18:48:25Z",
"flow": "payment",
"line_items": null,
"metadata": {},
"mode": "live",
"payment_method": null,
"payment_method_options": {
"bank_transfer": {}
},
"payment_method_types": [
"bank_transfer"
],
"payment_resource": null,
"redirect_url": "https://pay.fintoc.com/cs_li5531onlFDi235",
"save_payment_method": null,
"session_token": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNzX2xpNTUzMSJ9.iV2qAVrqYLuqxF4",
"setup_intent": null,
"split": null,
"split_applied": null,
"status": "expired",
"subscription": null,
"success_url": "https://merchant.com/success"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"message": "Checkout session cannot be expired because its current status is not \"created\".",
"code": "forbidden_request",
"param": null,
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"message": "No such checkout_session: cs_li5531onlFDi235",
"code": "missing_resource",
"param": "id",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Expire a checkout session
Expires the checkout session with the given id before your customer completes the payment. You can only expire a session while its status is created. Expiring a session also expires any pending payment of the session and triggers a checkout_session.expired webhook event. Returns the session with its status set to expired.
curl --request POST \
--url https://api.fintoc.com/v2/checkout_sessions/{id}/expire \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/checkout_sessions/{id}/expire"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/checkout_sessions/{id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v2/checkout_sessions/{id}/expire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/checkout_sessions/{id}/expire"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/checkout_sessions/{id}/expire")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/checkout_sessions/{id}/expire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cs_li5531onlFDi235",
"object": "checkout_session",
"amount": 350000,
"business_profile": null,
"cancel_url": "https://merchant.com/cancel",
"created_at": "2026-01-13T18:48:25Z",
"currency": "CLP",
"customer_email": "customer@example.com",
"expires_at": "2026-01-14T18:48:25Z",
"flow": "payment",
"line_items": null,
"metadata": {},
"mode": "live",
"payment_method": null,
"payment_method_options": {
"bank_transfer": {}
},
"payment_method_types": [
"bank_transfer"
],
"payment_resource": null,
"redirect_url": "https://pay.fintoc.com/cs_li5531onlFDi235",
"save_payment_method": null,
"session_token": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNzX2xpNTUzMSJ9.iV2qAVrqYLuqxF4",
"setup_intent": null,
"split": null,
"split_applied": null,
"status": "expired",
"subscription": null,
"success_url": "https://merchant.com/success"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"message": "Checkout session cannot be expired because its current status is not \"created\".",
"code": "forbidden_request",
"param": null,
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"message": "No such checkout_session: cs_li5531onlFDi235",
"code": "missing_resource",
"param": "id",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Authorizations
Path Parameters
Unique identifier for the checkout session to expire.
Response
The expired checkout session, with its status set to expired.
Unique identifier of the checkout session.
"cs_li5531onlFDi235"
Type of the object. Always checkout_session.
Amount the session charges your customer, in the smallest unit of currency. For CLP the smallest unit is one peso (CLP has no decimals), so 350000 means $350,000 CLP. For MXN the smallest unit is one centavo, so 350000 means $3,500.00 MXN. null for setup and subscription flow sessions, which do not carry a single amount.
350000
Business on whose behalf you collect the payment, for payment aggregators. null when the session was created without a business profile.
Show child attributes
Show child attributes
URL Fintoc redirects your customer to when the payment is not completed. null when the session was created without redirect URLs.
"https://merchant.com/cancel"
ISO 8601 timestamp of when the checkout session was created.
"2026-01-13T18:48:25Z"
Three-letter ISO 4217 currency code, in uppercase. One of CLP or MXN.
CLP, MXN "CLP"
Email of your customer, used to send the payment receipt. null when not provided.
"customer@example.com"
ISO 8601 timestamp of when the checkout session expires. After this time your customer can no longer pay the session.
"2026-01-14T18:48:25Z"
Flow the session runs. One of payment (collects a one-time payment), subscription (starts a recurring subscription), or setup (saves a payment method for future payments).
payment, subscription, setup "payment"
Items the session charges for. null when the session was created without line items.
Show child attributes
Show child attributes
Set of key-value pairs you attached to the session.
Mode of the object. live objects use real institution data, test objects use fake data for integration testing.
test, live "live"
id of the saved payment method that pays the session. null when the session is not paid with a previously saved payment method.
"pm_xL9mPq2RkV3WnDQG"
Configuration of the session's payment methods, keyed by payment method type. Each key matches one of payment_method_types and holds the options you set when creating the session, such as the recipient_account for bank_transfer or the kinds for card. See POST /v2/checkout_sessions for the full shape.
Payment method types your customer can use to pay the session. One or more of card, bank_transfer, installments, and pac (automatic recurring bank debit).
bank_transfer, installments, card, pac Payment generated by the session. null until your customer starts a payment attempt.
Show child attributes
Show child attributes
URL of the Fintoc-hosted checkout page where your customer completes the payment. Redirect your customer to this URL after creating the session. null for sessions paid through the Fintoc widget instead of a redirect.
"https://pay.fintoc.com/cs_li5531onlFDi235"
Token used to initialize the Fintoc widget to pay the session. null for subscription and setup flow sessions and for payments completed outside the widget, like non-embedded card payments.
"eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNzX2xpNTUzMSJ9.iV2qAVrqYLuqxF4"
Unique identifier for the setup intent created by setup and subscription flow sessions. null for other flows and until Fintoc attempts a setup. Retrieve the setup intent's status and error with the setup intent endpoint.
"seti_xL9mPq2RkV3WnDQG"
Rules for dividing the payment between entities, exactly as you provided them when creating the session. null when the session was created without a split.
Show child attributes
Show child attributes
Amounts each entity receives from the payment. null when the session was created without a split.
Show child attributes
Show child attributes
Lifecycle status of the session. created until your customer starts paying, in_progress while Fintoc processes the payment, and finished or expired once the session succeeds or expires.
created, in_progress, expired, finished "created"
id of the subscription started by a subscription flow session. null until the subscription is created and for other flows.
"sub_xL9mPq2RkV3WnDQG"
URL Fintoc redirects your customer to after a successful payment. null when the session was created without redirect URLs.
"https://merchant.com/success"
ISO 8601 datetime, in UTC, of the first charge of the subscription started by the session. The API returns this field only for subscription flow sessions; the value is null when the session was created without an anchor.
"2026-02-01T00:00:00Z"
Customer the session belongs to. This key is omitted (not null) when the session has no customer.
Show child attributes
Show child attributes
Whether the session offers your customer the option to save their payment method for future payments. One of enabled or disabled. Only returned for payment flow sessions; null when not configured.
disabled, enabled, null "enabled"
ISO 8601 datetime, in UTC, when the trial for the subscription started by the session ends and charges begin. The API returns this field only for subscription flow sessions; the value is null when the session was created without a trial.
"2026-01-24T18:48:25Z"
Was this page helpful?