Delete payment method
curl --request DELETE \
--url https://api.quentli.com/v1/payment-methods/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.quentli.com/v1/payment-methods/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.quentli.com/v1/payment-methods/{id}', 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.quentli.com/v1/payment-methods/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.quentli.com/v1/payment-methods/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.quentli.com/v1/payment-methods/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/payment-methods/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paymentMethod": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"customerId": "<string>",
"confirmed": true,
"default": true,
"deletedAt": null,
"bankAccountId": null,
"expired": true,
"cardDetail": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"expiryMonth": 123,
"expiryYear": 123,
"bin": "<string>",
"last4": "<string>",
"cardholder": "<string>",
"brand": "<string>",
"issuer": "<string>",
"isCorporate": true,
"country": "<string>",
"funding": "<string>"
},
"bankAccount": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"country": "<string>",
"verified": true,
"clabeLast": "<string>",
"clabeFirst": "<string>",
"customerId": "<string>",
"deletedAt": "<string>"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Payment Methods
Delete payment method
Deletes a payment method by id.
DELETE
/
v1
/
payment-methods
/
{id}
Delete payment method
curl --request DELETE \
--url https://api.quentli.com/v1/payment-methods/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.quentli.com/v1/payment-methods/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.quentli.com/v1/payment-methods/{id}', 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.quentli.com/v1/payment-methods/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.quentli.com/v1/payment-methods/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.quentli.com/v1/payment-methods/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/payment-methods/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paymentMethod": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"customerId": "<string>",
"confirmed": true,
"default": true,
"deletedAt": null,
"bankAccountId": null,
"expired": true,
"cardDetail": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"expiryMonth": 123,
"expiryYear": 123,
"bin": "<string>",
"last4": "<string>",
"cardholder": "<string>",
"brand": "<string>",
"issuer": "<string>",
"isCorporate": true,
"country": "<string>",
"funding": "<string>"
},
"bankAccount": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"country": "<string>",
"verified": true,
"clabeLast": "<string>",
"clabeFirst": "<string>",
"customerId": "<string>",
"deletedAt": "<string>"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Authorizations
Organization API key using Authorization: Bearer sk_....
Path Parameters
Identifier of the payment method.
Response
Payment method deleted
Response after deleting a payment method.
Saved payment method associated with a customer.
Show child attributes
Show child attributes
Was this page helpful?
⌘I