curl -X POST https://api.helvcore.ch/v1/allocations \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
}'const res = await fetch("https://api.helvcore.ch/v1/allocations", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.HELVCORE_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json"
},
body: JSON.stringify({
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
})
});
const data = await res.json();import os, requests, uuid
headers = {"Authorization": f"Bearer {os.environ['HELVCORE_API_KEY']}"}
headers["Idempotency-Key"] = str(uuid.uuid4())
headers["Content-Type"] = "application/json"
res = requests.post("https://api.helvcore.ch/v1/allocations", headers=headers, json={
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
})
data = res.json()
curl -X POST https://api.helvcore.ch/v1/allocations \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
}'
201
{
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
}
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"customer_credit_balance": {
"amount_minor": 123,
"currency": "CHF"
},
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"id": "string",
"journal_entry_id": "string",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string",
"open_amount_before": {
"amount_minor": 123,
"currency": "CHF"
}
}
],
"object": "payment_allocation",
"payment_id": "string",
"reversal_journal_entry_id": "string",
"state": "draft",
"created_at": "2026-03-31T12:00:00Z",
"intents": [
{}
]
}
{
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"lines": [
{
"amount": {
"amount_minor": 123,
"currency": "CHF"
},
"document_id": "string"
}
],
"payment_id": "string",
"posting_date": "2026-03-31"
}