curl --request POST \
--url https://api.fintoc.com/v2/payment_methods/{id}/cancel \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/payment_methods/{id}/cancel"
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/payment_methods/{id}/cancel', 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/payment_methods/{id}/cancel",
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/payment_methods/{id}/cancel"
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/payment_methods/{id}/cancel")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/payment_methods/{id}/cancel")
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": "pm_3pQrStUvWxYzAbCd",
"object": "payment_method",
"created_at": "2026-01-15T14:30:00.000Z",
"customer": "cus_oVgVqlnK0PdmGirH",
"mode": "live",
"pac": {
"account_holder_id": "111111111",
"account_number": "001111111111",
"account_type": "checking_account",
"institution": {
"id": "cl_banco_de_chile",
"country": "cl",
"name": "Banco de Chile"
},
"status": "canceled"
},
"type": "pac"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such payments/payment_method: pm_nonexistent",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "payment_method_non_cancelable",
"param": null,
"message": "Payment method is not cancelable. The payment method is already canceled",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Cancel a payment method
Cancels a payment method so the payment method can no longer be charged. The cancellation applies only to this payment method. The bank account, card, or mandate behind the payment method stays valid for any other payment method that uses the same account, card, or mandate. The canceled payment method reports the cancellation through its type-specific details: pac.status, mx_direct_debit.status, and bank_transfer.status become canceled; card.active becomes false. Fintoc sends a payment_method.canceled webhook after processing the cancellation. Canceling an already canceled payment method returns a 409 Conflict error. If the customer registers the same bank account, card, or mandate again through a new checkout session, Fintoc reactivates the canceled payment method under the same id.
curl --request POST \
--url https://api.fintoc.com/v2/payment_methods/{id}/cancel \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/payment_methods/{id}/cancel"
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/payment_methods/{id}/cancel', 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/payment_methods/{id}/cancel",
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/payment_methods/{id}/cancel"
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/payment_methods/{id}/cancel")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/payment_methods/{id}/cancel")
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": "pm_3pQrStUvWxYzAbCd",
"object": "payment_method",
"created_at": "2026-01-15T14:30:00.000Z",
"customer": "cus_oVgVqlnK0PdmGirH",
"mode": "live",
"pac": {
"account_holder_id": "111111111",
"account_number": "001111111111",
"account_type": "checking_account",
"institution": {
"id": "cl_banco_de_chile",
"country": "cl",
"name": "Banco de Chile"
},
"status": "canceled"
},
"type": "pac"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such payments/payment_method: pm_nonexistent",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "payment_method_non_cancelable",
"param": null,
"message": "Payment method is not cancelable. The payment method is already canceled",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Response
The canceled payment method, with its details reporting the cancellation.
- Option 1
- Option 2
- Option 3
- Option 4
A payment method represents a customer's stored payment instrument, ready to be charged without the customer going through the full authorization flow again. The shape of the object depends on its type: the type-specific details live under a key named after the type (bank_transfer, card, mx_direct_debit, or pac).
Was this page helpful?