End users

Allocate credits to an end-user

Atomic platform-pool → end-user transfer; both sides ledgered. Fails (402) if the pool cannot cover it — unfunded allocations are impossible. Amounts are exact decimal strings.

post/credits/end-users/{externalUserId}/allocate

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/end-users/{externalUserId}/allocate
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

externalUserIdstring required

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

Headers

Idempotency-Keystring required

One key per logical transfer; reuse it on retries.

Request body

creditsstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

promoboolean

Ledger as a promo/comp grant

Response

Allocation applied; returns both balances

successunknown required
externalUserIdstring required

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

usdstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

creditsstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

poolBalanceUsdstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

endUserBalanceUsdstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

Changes

No recorded changes to this operation across all 1 revision of this API.