Create an invoice payment
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments \
--header 'Content-Type: application/json' \
--data '
{
"date": "2023-12-25",
"payment_method_id": "<string>",
"currency": "<string>",
"items": [
{
"invoice_id": "<string>",
"amount": 123
}
],
"currency_exchange_rate": 1,
"reference": "<string>",
"number": "<string>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments"
payload = {
"date": "2023-12-25",
"payment_method_id": "<string>",
"currency": "<string>",
"items": [
{
"invoice_id": "<string>",
"amount": 123
}
],
"currency_exchange_rate": 1,
"reference": "<string>",
"number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
payment_method_id: '<string>',
currency: '<string>',
items: [{invoice_id: '<string>', amount: 123}],
currency_exchange_rate: 1,
reference: '<string>',
number: '<string>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/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.chift.eu/consumers/{consumer_id}/accounting/invoices/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([
'date' => '2023-12-25',
'payment_method_id' => '<string>',
'currency' => '<string>',
'items' => [
[
'invoice_id' => '<string>',
'amount' => 123
]
],
'currency_exchange_rate' => 1,
'reference' => '<string>',
'number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.chift.eu/consumers/{consumer_id}/accounting/invoices/payments"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chift.eu/consumers/{consumer_id}/accounting/invoices/payments")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Error while trying to perform your request",
"status": "error"
}{
"message": "Validation error",
"status": "error",
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Invoices
Create an invoice payment
Create invoice payment
POST
/
consumers
/
{consumer_id}
/
accounting
/
invoices
/
payments
Create an invoice payment
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments \
--header 'Content-Type: application/json' \
--data '
{
"date": "2023-12-25",
"payment_method_id": "<string>",
"currency": "<string>",
"items": [
{
"invoice_id": "<string>",
"amount": 123
}
],
"currency_exchange_rate": 1,
"reference": "<string>",
"number": "<string>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments"
payload = {
"date": "2023-12-25",
"payment_method_id": "<string>",
"currency": "<string>",
"items": [
{
"invoice_id": "<string>",
"amount": 123
}
],
"currency_exchange_rate": 1,
"reference": "<string>",
"number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
payment_method_id: '<string>',
currency: '<string>',
items: [{invoice_id: '<string>', amount: 123}],
currency_exchange_rate: 1,
reference: '<string>',
number: '<string>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/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.chift.eu/consumers/{consumer_id}/accounting/invoices/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([
'date' => '2023-12-25',
'payment_method_id' => '<string>',
'currency' => '<string>',
'items' => [
[
'invoice_id' => '<string>',
'amount' => 123
]
],
'currency_exchange_rate' => 1,
'reference' => '<string>',
'number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.chift.eu/consumers/{consumer_id}/accounting/invoices/payments"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chift.eu/consumers/{consumer_id}/accounting/invoices/payments")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/invoices/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-12-25\",\n \"payment_method_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"invoice_id\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"currency_exchange_rate\": 1,\n \"reference\": \"<string>\",\n \"number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Error while trying to perform your request",
"status": "error"
}{
"message": "Validation error",
"status": "error",
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Id of the accounting folder instance. A folder represents a legal entity within the system. Required when the multiple folders feature is enabled.
Body
application/json
The date of the payment
Technical ID of the payment method in the accounting system.
Payment currency
Payment's repartition
Show child attributes
Show child attributes
Exchange rate applicable at the payment date. Required when the currency is different from the system's currency.
External reference of the payment.
Unique Payment number (if managed by the software).
Response
Successful Response
⌘I