Cancel Payments
1 min
POST
https://api.nue.io/billing/invoices:cancel-payments
Body Parameters
- bodyobjectrequiredDescription
- paymentIdsstring[]requiredDescription
Responses
200
- object
- paymentApplicationsobject[]Description
- idstring
- invoiceIdstring
- debitMemoIdstring
- paymentIdstring
- transactionAmountnumber
- errorCodestring
- errorMessagestring
400
- object
- titlestring
- messagestring
- errorCodestring
404
- object
curl
curl --request POST \
--url https://api.nue.io/billing/invoices:cancel-payments \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"paymentIds": []
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"paymentIds": []
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/billing/invoices:cancel-payments", 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://api.nue.io/billing/invoices:cancel-payments")
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({
"paymentIds": []
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/billing/invoices:cancel-payments"
payload = json.dumps({
"paymentIds": []
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"paymentApplications": [
{
"id": "",
"invoiceId": "",
"debitMemoId": "",
"paymentId": "",
"transactionAmount": 0,
"errorCode": "",
"errorMessage": ""
}
]
}400
// Bad Request
{
"title": "",
"message": "",
"errorCode": ""
}404
// Not Found
{}