Recover
...
API Reference
Recover Enterprise API
Payment Method Update
1min
code examples curl location 'https //api butterpayments com/recover/payment method updates' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "customer id" "", "payment method id" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "customer id" "", "payment method id" "" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api butterpayments com/recover/payment method updates", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api butterpayments com/recover/payment method updates") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "customer id" "", "payment method id" "" }) response = https request(request) puts response read body import requests import json url = "https //api butterpayments com/recover/payment method updates" payload = json dumps({ "customer id" "", "payment method id" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // request successful { "message" "request submitted for processing", "request id" "2c941653 b229 4528 b576 70fcfd388543 49645839701979566120793328447151049151317978254208401410 000000000000" }// request failed validation { "message" "invalid request body", "errors" \[ {} ] }// invalid api key { "message" "forbidden", "errors" "invalid api key" }// method/path not found { "message" "method/path combination not found " }// unsupported media type { "message" "unsupported media type", "errors" "content type must be application/json" }// server error