Users

Grant Tenant Member Credit

Transfer credit from the reseller's own wallet to one of their members.

A reseller buys credit from us and resells it; this is how they hand a slice of their balance to a customer. It is a MOVE, not a mint: the same amount leaves the owner's wallet as arrives in the member's, so no one can create balance out of nothing.

Every guard here matters, because the request body names the account being paid:

  • caller must own at least one member (_verify_tenant_owner);
  • the target must be their member — checked with tenant_owner_id, so naming a stranger's user_id credits nobody;
  • amount is bounded above zero and at 1000 by the schema, so a negative value cannot be used to drain a member;
  • both writes run in ONE transaction — a crash between them would otherwise duplicate or destroy money;
  • the debit uses the same add_wallet_balance function as every other movement, which locks the row and refuses to go below zero.
post/v1/users/me/tenant/members/credit

Request

  • Base URL: https://api.call2me.app
  • URL: https://api.call2me.app/v1/users/me/tenant/members/credit
  • Auth: HTTP bearer

Request body

member_idstring required

User ID of the member to credit

notestring nullable

Response

Successful Response

unknown required

Changes

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