A plan change waiting for its payment, read from Stripe
A plan change waiting for its payment, read from Stripe (account owner)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
Leaving Starter's trial for another plan is charged at once, and Stripe applies the change only when that
payment goes through (until then it is the subscription's pending update and the trial stays). This reads
from Stripe whether such a change waits and why it isn't paid: authentication_required (the bank asks
the customer to confirm the payment: open pay_url, Stripe's hosted invoice page, to confirm and pay),
a decline (card_declined, insufficient_funds, expired_card, incorrect_card_details: change the
card in the billing portal and try again, or pay the invoice at pay_url with another card),
processing (the payment is under way) or unknown. Once Stripe has the payment it applies the change;
its webhook or POST /v1/billing/sync brings the new plan in. Payments happen on Stripe's pages only.
{"pending": false} when nothing waits. 409 not_available when billing is off.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
Whether a plan change waits for its payment, and why
application/json- response
A plan change waiting for its payment (leaving the trial is charged at once). Also the details of the
402 payment_failed that POST /v1/billing/checkout answers when that payment didn't go through
(without pending).
pending*booleanA plan change waits for its payment; false when none does (nothing else is set then)
reason?stringWhy the payment hasn't gone through: authentication_required (the bank asks the customer to confirm it,
3-D Secure; confirm at pay_url), a decline (card_declined and the more precise insufficient_funds,
expired_card, incorrect_card_details: another card is needed), processing (under way, nothing to do)
or unknown (Stripe's answer couldn't be read).
"authentication_required""card_declined""insufficient_funds""expired_card""incorrect_card_details""processing""unknown"decline_code?stringStripe's decline code or error code, as Stripe gives it
pay_url?stringStripe's hosted invoice page for the unpaid invoice, where the customer confirms the payment with the bank or pays with another card. Absent when the invoice isn't open or has no such page.
uriplan?stringThe plan waiting for the payment
expires_at?stringWhen Stripe drops the change if it is still unpaid
date-timecurl -X GET 'https://staqly.example.com/v1/billing/pending-payment'{ "pending": true, "reason": "authentication_required", "decline_code": "insufficient_funds", "pay_url": "https://invoice.stripe.com/i/acct_123/test_abc", "plan": "pro", "expires_at": "2019-08-24T14:15:22Z"}