curl --request POST \
--url https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "<string>",
"accounting_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"register_payment_method_id": "<string>",
"description": "<string>",
"actual_fee_amount": 1,
"exchange_rates": "<string>",
"cheque": {
"series": "<string>",
"number": "<string>",
"issuing_bank_name": "<string>",
"issuing_bank_code": "<string>",
"drawer_name": "<string>",
"drawer_account_reference": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve"
payload = {
"event_id": "<string>",
"accounting_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"register_payment_method_id": "<string>",
"description": "<string>",
"actual_fee_amount": 1,
"exchange_rates": "<string>",
"cheque": {
"series": "<string>",
"number": "<string>",
"issuing_bank_name": "<string>",
"issuing_bank_code": "<string>",
"drawer_name": "<string>",
"drawer_account_reference": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '<string>',
accounting_date: '2023-11-07T05:31:56Z',
reference: '<string>',
value: 123,
currency_code: '<string>',
currency_exponent: 9,
register_payment_method_id: '<string>',
description: '<string>',
actual_fee_amount: 1,
exchange_rates: '<string>',
cheque: {
series: '<string>',
number: '<string>',
issuing_bank_name: '<string>',
issuing_bank_code: '<string>',
drawer_name: '<string>',
drawer_account_reference: '<string>',
issue_date: '2023-11-07T05:31:56Z',
due_date: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve', 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/accounting/cheques/{cheque}/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event_id' => '<string>',
'accounting_date' => '2023-11-07T05:31:56Z',
'reference' => '<string>',
'value' => 123,
'currency_code' => '<string>',
'currency_exponent' => 9,
'register_payment_method_id' => '<string>',
'description' => '<string>',
'actual_fee_amount' => 1,
'exchange_rates' => '<string>',
'cheque' => [
'series' => '<string>',
'number' => '<string>',
'issuing_bank_name' => '<string>',
'issuing_bank_code' => '<string>',
'drawer_name' => '<string>',
'drawer_account_reference' => '<string>',
'issue_date' => '2023-11-07T05:31:56Z',
'due_date' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve"
payload := strings.NewReader("{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"company_id": "<string>",
"organization_id": "<string>",
"customer": {},
"customer_id": "<string>",
"order": {},
"amount": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"original_amount": 123,
"original_currency_code": "<string>",
"original_currency_exponent": 123,
"reference": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"accounting_status": "<string>",
"settlement_id": "<string>",
"cheque_transfer_id": "<string>",
"identity": {},
"financial_status": "<string>",
"status": "<string>",
"recovery_status": "<string>",
"accounting_owner": {},
"physical_holder": {},
"version": 123,
"operations": "<array>"
}{
"message": "<string>",
"errors": {}
}Replace a bounced cheque payment
Records a new payment from the customer to make up for a bounced or returned cheque, closing the open debt (company space).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "<string>",
"accounting_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"register_payment_method_id": "<string>",
"description": "<string>",
"actual_fee_amount": 1,
"exchange_rates": "<string>",
"cheque": {
"series": "<string>",
"number": "<string>",
"issuing_bank_name": "<string>",
"issuing_bank_code": "<string>",
"drawer_name": "<string>",
"drawer_account_reference": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve"
payload = {
"event_id": "<string>",
"accounting_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"register_payment_method_id": "<string>",
"description": "<string>",
"actual_fee_amount": 1,
"exchange_rates": "<string>",
"cheque": {
"series": "<string>",
"number": "<string>",
"issuing_bank_name": "<string>",
"issuing_bank_code": "<string>",
"drawer_name": "<string>",
"drawer_account_reference": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '<string>',
accounting_date: '2023-11-07T05:31:56Z',
reference: '<string>',
value: 123,
currency_code: '<string>',
currency_exponent: 9,
register_payment_method_id: '<string>',
description: '<string>',
actual_fee_amount: 1,
exchange_rates: '<string>',
cheque: {
series: '<string>',
number: '<string>',
issuing_bank_name: '<string>',
issuing_bank_code: '<string>',
drawer_name: '<string>',
drawer_account_reference: '<string>',
issue_date: '2023-11-07T05:31:56Z',
due_date: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve', 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/accounting/cheques/{cheque}/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event_id' => '<string>',
'accounting_date' => '2023-11-07T05:31:56Z',
'reference' => '<string>',
'value' => 123,
'currency_code' => '<string>',
'currency_exponent' => 9,
'register_payment_method_id' => '<string>',
'description' => '<string>',
'actual_fee_amount' => 1,
'exchange_rates' => '<string>',
'cheque' => [
'series' => '<string>',
'number' => '<string>',
'issuing_bank_name' => '<string>',
'issuing_bank_code' => '<string>',
'drawer_name' => '<string>',
'drawer_account_reference' => '<string>',
'issue_date' => '2023-11-07T05:31:56Z',
'due_date' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve"
payload := strings.NewReader("{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/cheques/{cheque}/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_id\": \"<string>\",\n \"accounting_date\": \"2023-11-07T05:31:56Z\",\n \"reference\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"register_payment_method_id\": \"<string>\",\n \"description\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"exchange_rates\": \"<string>\",\n \"cheque\": {\n \"series\": \"<string>\",\n \"number\": \"<string>\",\n \"issuing_bank_name\": \"<string>\",\n \"issuing_bank_code\": \"<string>\",\n \"drawer_name\": \"<string>\",\n \"drawer_account_reference\": \"<string>\",\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"company_id": "<string>",
"organization_id": "<string>",
"customer": {},
"customer_id": "<string>",
"order": {},
"amount": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"original_amount": 123,
"original_currency_code": "<string>",
"original_currency_exponent": 123,
"reference": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"accounting_status": "<string>",
"settlement_id": "<string>",
"cheque_transfer_id": "<string>",
"identity": {},
"financial_status": "<string>",
"status": "<string>",
"recovery_status": "<string>",
"accounting_owner": {},
"physical_holder": {},
"version": 123,
"operations": "<array>"
}{
"message": "<string>",
"errors": {}
}cheques.resolve
Conditions
- The organization’s plan must include the accounting module; otherwise the call is refused before anything else.
- This action is available only in the company space.
- The cheque must be unpaid or returned and its recovery status must be open; a cheque already resolved or written off is refused. Calling again after success is therefore refused, not replayed.
- The caller must be an active cashier assigned to a cash register; otherwise the call is refused.
- The caller also needs the permission to create repayments and access to the customer.
- register_payment_method_id must be a payment method of the your company; its route must support incoming payments, must not be of type other, a cash method needs a configured cash account, and a non-cash method needs a money account open to the company for incoming flows.
- When the payment method is cheque, cheque.series, cheque.number, cheque.issuing_bank_name, cheque.drawer_name and cheque.issue_date are required; with any other method the cheque object is refused.
- exchange_rates is refused.
- actual_fee_amount is refused when the fee rule of the payment method is not of type actual, and required when it is.
- The amount of the replacement payment, converted to the company currency, must equal the cheque amount exactly, otherwise the call is refused.
- The original payment must still have its order allocations (or, for a refunded cheque, its refunded claim); otherwise the call is refused.
- A replacement payment already linked to this cheque with a different payload is refused as a conflict.
- cheque.due_date must not be before cheque.issue_date.
- Creates a repayment of the cheque amount, linked to the cheque, dated now and attached to the cashier’s cash register.
- Records a movement on the customer’s outstanding debt.
- Applies the replacement payment to the same orders the original cheque paid (not when the original payment had been refunded).
- Posts the accounting entry of the payment: against the unpaid-cheque account when the cheque is unpaid, against the customer receivable when it is returned.
- Sets the cheque recovery status to resolved, increments its version and sets the payment source status to resolved. No step is added to the cheque history.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the cheque (27-character KSUID).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, company_id, organization_id, customer, customer_id, identity, financial_status, status, recovery_status, accounting_owner, physical_holder, version, source_type, source_id, amount, currency_code, currency_exponent, original_amount, original_currency_code, original_currency_exponent, reference, received_at, accounting_status, settlement_id, cheque_transfer_id, order.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: operations.
Body
Required, up to 120 characters. Not used to replay the request: a second call is refused because the cheque recovery is already resolved.
120Required date (ISO 8601). It is validated, but the replacement payment itself is recorded with the current date.
Required. Reference of the replacement payment (for example the new cheque number or a receipt number), up to 100 characters.
100Required. Amount of the replacement payment in major units (a decimal, up to 18 decimals, greater than 0) of currency_code. Converted to the company currency, it must equal the cheque amount exactly.
ISO 4217 code of the currency the customer pays in, three letters. Default: the company's currency. Converted to upper case.
3Number of decimal places of the currency (0 for XOF). An amount in minor units divided by 10 to this power gives the amount in the currency.
0 <= x <= 18Required. Identifier (27-character KSUID) of the payment method of the cash register used for the replacement payment. It decides whether the cheque details are required.
27Optional text for the replacement payment, up to 255 characters. A default description is used when omitted.
255Fee charged on the payment, in minor units. Refused when the payment method's fee rule is not of type actual, and required when it is.
x >= 0Not accepted: exchange rates are taken from the server's own conversion, not from the request.
Details of the new cheque. Required only when the payment method is cheque; refused for any other method.
Show child attributes
Show child attributes
Response
Resource (only with response=resource).
Identifier of the cheque (27-character KSUID).
Type of the payment this cheque came from, for example order_payment (a sale) or customer_credit_payment (a payment on a customer's debt).
Identifier of that originating payment (27-character KSUID).
Identifier of the company the record belongs to.
Identifier of the organization the record belongs to.
The customer who gave the cheque, as an object with the customer's id and name (name as recorded on the payment).
Identifier of the customer who gave the cheque (27-character KSUID).
The order the cheque paid, as an object with id and number; both are null when the cheque is not linked to an order.
Cheque amount in minor units of currency_code (divide by 10 to the power currency_exponent). It is the amount in the company's functional currency.
ISO 4217 code of the currency of amount.
Number of decimal places of the currency (0 for XOF). An amount in minor units divided by 10 to this power gives the amount in the currency.
Amount as tendered, in minor units of original_currency_code.
ISO 4217 code of the currency the customer paid in.
Number of decimal places of the original currency; divide original_amount by 10 to this power.
Reference recorded on the originating payment.
Date and time the payment was received (ISO 8601).
Status of the payment source for accounting. It starts as not_initiated, follows the cheque's financial status after each step (received, in_collection, settled, unpaid, returned), becomes resolved or written_off after recovery, and shows transferred or reversed for the older cheque-transfer flow.
Identifier of the settlement that moved this payment into a money account, when one exists.
Identifier of the older cheque transfer made for this payment, when one exists.
What is written on the cheque, as an object: series, number, issuing_bank_name, issuing_bank_code, drawer_name, drawer_account_reference, issue_date and due_date (dates as YYYY-MM-DD), beneficiary_name. Each is null when unknown.
Where the cheque is in its life: received (held, not yet deposited), in_collection (deposited at the bank), settled (the bank paid it), unpaid (the bank refused it), returned (given back to the customer).
Same value as financial_status.
Follow-up of an unpaid or returned cheque: open (the debt is still to be recovered), resolved (a replacement payment was recorded), written_off (the debt was written off). Null while no recovery applies.
Book that currently holds the cheque, as an object: type (company or organization) and id.
Who physically holds the paper cheque, as an object: type (company, organization, bank, customer or none) and id (null for bank and none).
Counter increased by one at each change of the cheque; use it to detect that the cheque moved.
Step history of the cheque in time order (deposit, settlement, rejection and so on, with reversals). Present only when requested with ?include=operations.