BizKitHub
DocsAPI ReferenceContact Credit/bff/contact-credit/create
postContact CreditAdmin BFF

/bff/contact-credit/create

Adds a credit transaction to a contact. Optionally tag it with a per-organisation credit reason via reasonExternalId, and optionally attribute the internal cost to a branch via payerBranchSlug so the credit shows up in that branch's payer-credit ledger in addition to the customer history.

Contact CreditpostBffContact-creditCreate

Parameters

JSON body

Request body

application/json
customerIdstringRequired

Contact external ID.

amountnumberRequired

Credit amount to add (positive or negative).

Examples100-50
amountMoneynumberOptional

Value in default currency. If omitted, defaults to same as amount (1:1).

Examples90-45
descriptionstringOptional

Optional free-form note for the transaction.

useExpirationbooleanRequired

Whether the credit has an expiration date.

expirationDatestringOptional

Expiration date for the credit (ISO format).

Example2026-12-31
reasonExternalIdstringOptional

External ID of a configured credit reason (16 chars). Optional label tagging the transaction.

Examplersn1234567890abc
payerBranchSlugstringOptional

Slug of the branch that internally bears the cost of this credit. Omit / empty = the organisation absorbs it (default).

Examplegymroom-plzen

Response schema

1 status code documented

200Success
successbooleanRequired
Default: true
spawnedWriteoffExternalIdstring | nullRequired

External id of the shop__expense row spawned as a branch write-off when payerBranchSlug was set. Null when the credit went to the organisation default (no branch attribution) or when the spawn failed (the failure is logged; the credit still applies).

One of 2:
Variant 1
string
Variant 2
null

Response example

application/json
{
  "success": true
}

Request example

POST /bff/contact-credit/create

post
curl -X POST "https://api.bizkithub.com/bff/contact-credit/create" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "customerId": "example_customerId",
  "amount": 100,
  "amountMoney": 90,
  "description": "example_description",
  "useExpiration": false,
  "expirationDate": "2026-12-31",
  "reasonExternalId": "rsn1234567890abc",
  "payerBranchSlug": "gymroom-plzen"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key