curl --request DELETE \
--url https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Cancel a customer payment
Cancels a recorded customer payment by refunding the customer, which puts the debt and order balances back.
curl --request DELETE \
--url https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/customer/customer-credit-payments/{customerCreditPayment}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}customer_credit_payments.delete
Conditions
- the call must come from a cashier whose register is open
- the refund lines must add up to the gross amount received
- refused while a cheque of this payment has been handed over to the organization
- the money is paid back through the register payment methods given, and the refund is posted in the accounts
- the orders this payment had settled are reopened for the same amounts
- what the customer owes goes back up by the payment amount
- the payment no longer appears in the list
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the customer payment.
Query Parameters
Date of the refund in the accounts. Today when left out.
Not accepted: the refund is paid from the register of the cashier making the call.
How the money goes back to the customer: one or more lines, each with register_payment_method_id (a method of the cashier's register that accepts outgoing money), amount in minor units and optionally actual_fee_amount. Their total must equal the gross amount that was received.
Show child attributes
Show child attributes
Response mode. Default none; none answers 204 No Content.
none Response
No Content (response mode none).