palbaseDocs

Palbase Payments · API

POST/payments/wallets/credit

Credit customer wallet

Grants promotional rewards, cashback, or administrative adjustments to a customer wallet with optional lot expiry. Requires Idempotency-Key.

Called by your server, with the project's secret key.

Headers

Idempotency-Keystring · requiredUnique client-supplied idempotency key (1-255 chars) ensuring safe retries without duplicate charges, refunds, or ledger movements.

Request body

amountinteger (int64) · requiredCredit amount in minor units.
customer_idstring · requiredCustomer UID.
expires_atstring (date-time) · optionalOptional lot expiration timestamp.
kind"reward" | "adjustment" | "top_up" · optionalCredit kind (reward, adjustment, top_up).
metadataobject · optionalArbitrary JSON metadata.
reasonstring · optionalReason.
referencestring · optionalReference.
source_reference_idstring · optionalOptional external source UUID for pending lot voiding.
source_reference_typestring · optionalOptional external source type (e.g. commerce_order) for pending lot voiding.
vests_atstring (date-time) · optionalOptional future vesting timestamp (RFC3339) for pending cashback/referral rewards.
wallet_keystring · requiredWallet key.
curl
curl -X POST "https://<your-ref>.palbase.studio/payments/wallets/credit" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"amount":0,"customer_id":"string","wallet_key":"string"}'

Responses

200OK

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation CreditWallet of payments's contract.