curl --request POST \
--url https://api.exowpee.com/v1/customer/customer-credit-payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"source": "cash_register",
"register_payment_method_id": "<string>",
"reference": "<string>",
"actual_fee_amount": 1,
"replacement_for_cheque_id": "<string>",
"cash_account_id": "<string>",
"money_account_id": "<string>",
"payment_method": "<string>",
"description": "<string>",
"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"
},
"order_ids": [
"<string>"
]
}
'import requests
url = "https://api.exowpee.com/v1/customer/customer-credit-payments"
payload = {
"customer_id": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"source": "cash_register",
"register_payment_method_id": "<string>",
"reference": "<string>",
"actual_fee_amount": 1,
"replacement_for_cheque_id": "<string>",
"cash_account_id": "<string>",
"money_account_id": "<string>",
"payment_method": "<string>",
"description": "<string>",
"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"
},
"order_ids": ["<string>"]
}
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({
customer_id: '<string>',
value: 123,
currency_code: '<string>',
currency_exponent: 9,
source: 'cash_register',
register_payment_method_id: '<string>',
reference: '<string>',
actual_fee_amount: 1,
replacement_for_cheque_id: '<string>',
cash_account_id: '<string>',
money_account_id: '<string>',
payment_method: '<string>',
description: '<string>',
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'
},
order_ids: ['<string>']
})
};
fetch('https://api.exowpee.com/v1/customer/customer-credit-payments', 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",
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([
'customer_id' => '<string>',
'value' => 123,
'currency_code' => '<string>',
'currency_exponent' => 9,
'source' => 'cash_register',
'register_payment_method_id' => '<string>',
'reference' => '<string>',
'actual_fee_amount' => 1,
'replacement_for_cheque_id' => '<string>',
'cash_account_id' => '<string>',
'money_account_id' => '<string>',
'payment_method' => '<string>',
'description' => '<string>',
'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'
],
'order_ids' => [
'<string>'
]
]),
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/customer/customer-credit-payments"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\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/customer/customer-credit-payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/customer/customer-credit-payments")
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 \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer_id": "<string>",
"source": "<string>",
"cash_register_id": "<string>",
"amount": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"original_amount": 123,
"original_currency_code": "<string>",
"original_currency_exponent": 123,
"conversion_snapshot": {},
"actual_fee_amount": 123,
"register_payment_method_id": "<string>",
"payment_method": "<string>",
"money_account_id": "<string>",
"cash_account_id": "<string>",
"payment_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Record a customer payment
Records money a credit customer pays back, and applies it to their unpaid orders (the ones due first, or the orders you choose).
curl --request POST \
--url https://api.exowpee.com/v1/customer/customer-credit-payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"source": "cash_register",
"register_payment_method_id": "<string>",
"reference": "<string>",
"actual_fee_amount": 1,
"replacement_for_cheque_id": "<string>",
"cash_account_id": "<string>",
"money_account_id": "<string>",
"payment_method": "<string>",
"description": "<string>",
"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"
},
"order_ids": [
"<string>"
]
}
'import requests
url = "https://api.exowpee.com/v1/customer/customer-credit-payments"
payload = {
"customer_id": "<string>",
"value": 123,
"currency_code": "<string>",
"currency_exponent": 9,
"source": "cash_register",
"register_payment_method_id": "<string>",
"reference": "<string>",
"actual_fee_amount": 1,
"replacement_for_cheque_id": "<string>",
"cash_account_id": "<string>",
"money_account_id": "<string>",
"payment_method": "<string>",
"description": "<string>",
"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"
},
"order_ids": ["<string>"]
}
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({
customer_id: '<string>',
value: 123,
currency_code: '<string>',
currency_exponent: 9,
source: 'cash_register',
register_payment_method_id: '<string>',
reference: '<string>',
actual_fee_amount: 1,
replacement_for_cheque_id: '<string>',
cash_account_id: '<string>',
money_account_id: '<string>',
payment_method: '<string>',
description: '<string>',
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'
},
order_ids: ['<string>']
})
};
fetch('https://api.exowpee.com/v1/customer/customer-credit-payments', 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",
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([
'customer_id' => '<string>',
'value' => 123,
'currency_code' => '<string>',
'currency_exponent' => 9,
'source' => 'cash_register',
'register_payment_method_id' => '<string>',
'reference' => '<string>',
'actual_fee_amount' => 1,
'replacement_for_cheque_id' => '<string>',
'cash_account_id' => '<string>',
'money_account_id' => '<string>',
'payment_method' => '<string>',
'description' => '<string>',
'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'
],
'order_ids' => [
'<string>'
]
]),
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/customer/customer-credit-payments"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\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/customer/customer-credit-payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/customer/customer-credit-payments")
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 \"customer_id\": \"<string>\",\n \"value\": 123,\n \"currency_code\": \"<string>\",\n \"currency_exponent\": 9,\n \"source\": \"cash_register\",\n \"register_payment_method_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"actual_fee_amount\": 1,\n \"replacement_for_cheque_id\": \"<string>\",\n \"cash_account_id\": \"<string>\",\n \"money_account_id\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"description\": \"<string>\",\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 \"order_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer_id": "<string>",
"source": "<string>",
"cash_register_id": "<string>",
"amount": 123,
"currency_code": "<string>",
"currency_exponent": 123,
"original_amount": 123,
"original_currency_code": "<string>",
"original_currency_exponent": 123,
"conversion_snapshot": {},
"actual_fee_amount": 123,
"register_payment_method_id": "<string>",
"payment_method": "<string>",
"money_account_id": "<string>",
"cash_account_id": "<string>",
"payment_date": "2023-11-07T05:31:56Z",
"reference": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}customer_credit_payments.create
Conditions
- the call must come from a cashier whose register is open; the payment is recorded at that register
- the customer must be allowed to buy on credit
- the register payment method must accept incoming money
- the amount cannot exceed what the customer owes on the chosen orders plus their opening balance
- the reference is required and must be unique among the company’s payments
- a cashier on an open register can record it without the customer payments permission
- the payment settles the chosen credit orders, or the unpaid ones due first, and marks them paid or partly paid; what remains reduces the opening balance
- what the customer owes goes down by the amount received
- the repayment is posted in the accounts, in the cash, bank or mobile money account of the register payment method, with the operator fee if there is one
- a payment in another currency is converted into the company currency, and the rate used is kept on the payment
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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, customer_id, source, cash_register_id, amount, currency_code, currency_exponent, original_amount, original_currency_code, original_currency_exponent, conversion_snapshot, actual_fee_amount, register_payment_method_id, payment_method, money_account_id, cash_account_id, payment_date, reference, description, created_at, updated_at.
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: .
Body
Customer who pays. They must belong to the company, not be deleted, and be allowed to buy on credit.
Amount received, in the currency given by currency_code, written in major units (15000, or 12.5 for a currency with decimals). It may not have more decimal places than currency_exponent allows. It cannot be more than what the customer owes on the chosen orders plus their opening balance.
Currency the customer paid in, as a three-letter code in capitals, such as XOF. The company currency when left out. A payment in another currency is converted into the company currency.
3Number of decimal places of that currency (0 for XOF). The company currency's when left out.
0 <= x <= 18Where the money is taken. Only cash_register is accepted: the payment is recorded at the register of the cashier making the call, who must have their register open.
cash_register Payment method of the cashier's register that receives the money (cash, mobile money, bank transfer, card or cheque). It must belong to that register and accept incoming money; methods of type other are refused.
27Your reference for this payment, such as a receipt number. Required, up to 100 characters, and unique among the company's payments.
100Fee the bank or mobile money operator actually took on this payment, in minor units. Required when the fee rule of the receiving account is the actual fee; refused otherwise.
x >= 0Not accepted here. To replace a bounced cheque, use Replace a bounced cheque payment.
Not accepted: taken from the register payment method.
Not accepted: taken from the register payment method.
Not accepted: taken from the register payment method.
Note kept on the payment and copied into the accounting entry. A standard wording is used when you leave it out.
255Not accepted.
Details of the cheque. Required when the register payment method is a cheque (series, number, issuing_bank_name, drawer_name and issue_date must then be filled), refused for any other method.
Show child attributes
Show child attributes
Credit orders of this customer that the payment settles. Leave it out to settle the unpaid orders due first. What goes beyond these orders reduces the customer's opening balance.
27Response
Resource (only with response=resource).
Identifier of the payment.
Customer who paid.
Where the payment was taken: cash_register.
Register where the payment was taken.
Amount received, converted into the company currency, in minor units of currency_code.
Company currency, in which amount is expressed.
Number of decimal places of the company currency.
Amount as the customer paid it, in minor units of original_currency_code.
Currency the customer paid in.
Number of decimal places of that currency.
Exchange rate details used to convert the payment into the company currency, as recorded in the accounts.
Fee the operator actually took, in minor units, when one was given.
Register payment method that received the money.
Kind of payment: cash, credit_card, bank_transfer, mobile_money or cheque.
Money account linked to the register payment method that received the money, when that method has one.
Cash account that received the money, for cash payments.
Moment the payment was recorded.
Your reference for the payment.
Note kept on the payment.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).