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"
}
}Autorizaciones
Parámetros de ruta
Unique identifier for the payment method to cancel.
Respuesta
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).
Unique identifier of the payment method.
"pm_1zXcVbNmAsDfGhJk"
Type of the object. Always payment_method.
Details of the linked bank account that pays the transfers. null when the linked account backing the payment method is no longer available.
Show child attributes
Show child attributes
ISO 8601 timestamp of when the payment method was created.
"2026-01-15T14:30:00.000Z"
Unique identifier of the customer the payment method belongs to.
"cus_oVgVqlnK0PdmGirH"
Mode of the payment method. live payment methods charge real money; test payment methods use fake data for integration testing.
live, test "live"
Type of the payment method. Always bank_transfer.
¿Esta página le ayudó?