Credits

Test a direct Shared Payment Token credit purchase (local sandbox only)

Unavailable in production. Requires explicit sandbox configuration and local Supabase. Attempts a test payment using a payer-issued SPT and the same USD base credit pricing as Checkout; no taxes or discounts are calculated. Requires write permission and Idempotency-Key; team purchases require active ownership. Workspace comes from authentication. The caller must obtain user approval for this exact purchase before submitting the token over HTTPS (HTTP only on localhost). Never put payment tokens in prompts or URLs. Only the dedicated signature-verified sandbox webhook grants credits. This is not MPP, a Muse-specific payment contract, or a Managed Payments integration. Never retry an uncertain outcome with a new key or token.

post/v1/credit-payments

Request

  • Base URL: https://api.masko.ai
  • URL: https://api.masko.ai/v1/credit-payments
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Request body

amount_centsinteger required

USD purchase amount in whole cents, from $10 to $10,000, before checkout taxes or discounts. Workspace comes from authentication.

shared_payment_tokenstring required

Sandbox Shared Payment Token issued by the payer wallet for this approved purchase. Never put it in a prompt, URL, log or saved card field.

Response

Sandbox payment status; credits_added is backed by the ledger

Changes

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