Payment Method - Delete
curl --request DELETE \
--url https://api.sandbox.pesaswap.io/payment_methods/{method_id} \
--header 'api-key: <api-key>'const options = {method: 'DELETE', headers: {'api-key': '<api-key>'}};
fetch('https://api.sandbox.pesaswap.io/payment_methods/{method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.pesaswap.io/payment_methods/{method_id}"
headers = {"api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.pesaswap.io/payment_methods/{method_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 => [
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
"deleted": true
}Payment Methods
Payment Method - Delete
Deletes a payment method of a customer.
DELETE
/
payment_methods
/
{method_id}
Payment Method - Delete
curl --request DELETE \
--url https://api.sandbox.pesaswap.io/payment_methods/{method_id} \
--header 'api-key: <api-key>'const options = {method: 'DELETE', headers: {'api-key': '<api-key>'}};
fetch('https://api.sandbox.pesaswap.io/payment_methods/{method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.pesaswap.io/payment_methods/{method_id}"
headers = {"api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.pesaswap.io/payment_methods/{method_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 => [
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
"deleted": true
}Authorizations
Use the API key created under your merchant account from the Pesaswap dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The unique identifier for the Payment Method