charge_saved_card
MOVES MONEY: charge a user's saved card off-session for one pack of a one-time pricing tier and credit it. idempotency_key is required; a retry with the same key never charges twice and returns the first outcome (replayed: true). Outcomes: 200 status succeeded (credits, new_balance); 202 status processing (not yet settled — retry later with the SAME key to check, never a new key); 402 status failed with code/decline_code (requires_action: true means the buyer must pay through checkout instead). Other errors: 404 no_saved_payment_method, 409 saved_payment_method_unusable, 400 tier_not_one_time, 502 charge_not_started (retry with the same key). Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Cred API key (optional if set via the x-api-key header) | |
| user_id | Yes | External user ID of the card holder | |
| project_id | No | Cred project ID (optional; the API key already identifies the project) | |
| x402_payment | No | Base64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD | |
| credit_type_id | No | Credit type to grant. Required when the tier allows several types (400 CREDIT_TYPE_REQUIRED otherwise) | |
| idempotency_key | Yes | Unique key for this charge (max 255 chars). Retrying with the same key and same arguments returns the first result instead of repeating it; reusing it for different arguments fails with 409 IDEMPOTENCY_KEY_REUSED. Generate a fresh key (e.g. a UUID) per intended operation and reuse it only to retry that operation. | |
| pricing_tier_id | Yes | One-time (or both) pricing tier to buy |