fundBalanceWithSharedPaymentToken
fundBalanceWithSharedPaymentToken: Stage adding funds to the balance by charging a Stripe Shared Payment Token the customer granted to OSIR. Use when a purchase (registerDomain, renewDomain, transferDomain, orderVps) failed for insufficient funds: that error tells you the networkId to mint against and both amounts. Mint the token for the GROSS and pass the NET as creditCents. Tokens are single-use. Requires authentication. Returns an actionId; tell the user what the card will be charged, then call executeConfirmedAction with the actionId if they approve. If this fails in any way you cannot fix by minting a fresh token, fall back to createPaymentSession and give the user the checkout URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | 3-letter ISO 4217 currency code, default USD. Must match the balance currency. | |
| sessionKey | No | Session key (osk_...) returned by checkDeviceLoginStatus. Pass it on every call when logged in via the in-chat device flow; omit when connected via OAuth. | |
| creditCents | Yes | NET amount to land in the balance, in minor units (cents). Use fundNetCents from the insufficient-funds error. The card is charged this plus the processing fee. | |
| description | No | What the funds are for, e.g. 'Funding registration of example.com'. Lands on the customer's transaction record. | |
| maxChargeCents | No | The usage_limits max_amount the token was minted with, i.e. fundGrossCents. Supplying it lets OSIR reject an impossible charge without calling Stripe. | |
| sharedPaymentToken | Yes | The Stripe Shared Payment Token, 'spt_...'. Minted for the GROSS amount against the networkId from the insufficient-funds error. Single-use. |