iR Engine API
payment-method-default
/payment-method-default
1 min
code examples curl location '/payment method default' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"body" {"accountid" "string","paymentmethodid" "string"}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" { "accountid" "string", "paymentmethodid" "string" } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("/payment method default", 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("/payment method default") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "body" { "accountid" "string", "paymentmethodid" "string" } }) response = http request(request) puts response read body import requests import json url = "/payment method default" payload = json dumps({ "body" { "accountid" "string", "paymentmethodid" "string" } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // created { "accountid" "", "paymentmethodid" "" }// not authenticated // general error