Charge Sales Order Card on File
POST/api/sales-orders/:salesOrder/charge-stored-method
Charge one of the customer's saved cards for (part of) the order's balance — or, for a card saved with Authorize.net, authorize it only (hold the amount, capture later).
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token (PAT).
Requires permission: sales_orders.manage_payments
Request body fields:
customer_payment_method_id(integer, required) — a saved card of the order's customer (Stripe or Authorize.net).amount(number, required, > 0, max 99999999) — the amount applied to the balance, in the order's currency. It can't exceed what is still chargeable: the outstanding balance less bank payments still settling and open card authorizations.apply_surcharge(boolean, nullable, default true) — add the card surcharge when the surcharge policy is on (it is computed on the server; it can be waived, never added when the policy is off).idempotency_key(string, nullable, max 200) — send one per attempt; a retried Stripe charge with the same key is not charged twice.mode(string, nullable:capture|authorize, defaultcapture) —authorizeis only allowed for Authorize.net cards: the amount is held on the card and no payment is recorded until it is captured (see Capture Authorize.net Authorization). Authorizations expire after 30 days.
Response: payment (the recorded payment, or null for an authorization), authorization (the open Authorize.net authorization, or null), processor (stripe | authorize_net), mode, amount, surcharge_amount, charged_amount, transaction_id.
Errors (422): the card isn't the customer's, was removed or expired; the card's account is disconnected; the order is cancelled; the amount is above what is chargeable; the Authorize.net account doesn't take the order's currency; a card payment on the order is still being confirmed; the card was declined (code / decline_code); or Authorize.net is holding the payment for fraud review (code: held_for_review — nothing is recorded until it is approved in Authorize.net).
Request
Responses
- 201
- 401
- 403
- 404
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.