Cancel customer payment method switches
1 min
DELETE
https://app.amberflo.io/customers/payment-method/switch
Query Parameters
- customerIdstringrequiredExampleDescription
- switchTimeInSecondsinteger<int64>requiredExampleDescription
Responses
200
- customer.payment_method.CustomerPaymentMethodSwitch.out[]Description
- customerIdstringrequiredDescription
- sourcePaymentTypecustomer.payment_method.BillingSystem.inDescription
- sourcePaymentIdstringDescription
- targetPaymentTypecustomer.payment_method.BillingSystem.inrequiredDescription
- targetPaymentIdstringrequiredDescription
- targetCustomerIdentifierstringrequiredDescription
- switchTimeInSecondsinteger<int64>requiredDescription
- createdTimeInSecondsinteger<int64>Description
- updatedTimeInSecondsinteger<int64>Description
400
401
403
404
500
curl
curl --request DELETE \
--url 'https://app.amberflo.io/customers/payment-method/switch?customerId=customer_123&switchTimeInSeconds=1703980800' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://app.amberflo.io/customers/payment-method/switch?customerId=customer_123&switchTimeInSeconds=1703980800", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/customers/payment-method/switch?customerId=customer_123&switchTimeInSeconds=1703980800")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/customers/payment-method/switch?customerId=customer_123&switchTimeInSeconds=1703980800"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200
// Successfully canceled payment method switches and returns array of affected switch records
[
{
"customerId": "",
"sourcePaymentType": "",
"sourcePaymentId": "",
"targetPaymentType": "",
"targetPaymentId": "",
"targetCustomerIdentifier": "",
"switchTimeInSeconds": "",
"createdTimeInSeconds": "",
"updatedTimeInSeconds": ""
}
]400
// Invalid customer ID format, invalid timestamp, or malformed request parameters
401
// Authentication required or invalid API key provided
403
// Insufficient permissions to modify customer payment method switches
404
// Customer not found or no payment method switches scheduled for cancellation
500
// Internal server error occurred while canceling payment method switches