Skip to main content

Payments troubleshooting

Beta

Being rolled out. The interface described here is the one of the next release: it may still change, and may not be enabled on your tenant yet.

What it is for​

This page gathers the error responses of the payment API and the situations where a payment, a subscription period or a webhook does not go as expected.

How to read an error​

All API errors use the application/problem+json format, for example:

{
"title": "Unprocessable Entity",
"status": 422,
"detail": "invalid cart",
"errors": [ { "field": "lines[0].unit_amount", "message": "must be a decimal string" } ]
}

errors[] points to the faulty field. Always start there.

By response code​

CodeMeaningTo check
400unreadable request (invalid JSON), or Idempotency-Key missing on a charge or a refundthe body and the headers
401token missing, expired or unreadablerequest a new token (client_credentials)
403the token's application is not declared in your BillingAccount, the account is not ready, the scope is missing, or the mode (one_time, subscription, usage) is not allowedidentity.applications, scopes, billingModes; GET /v1/account
404unknown identifier for your account (another account's data is never visible)the identifier and its prefix (cart_, cus_, sub_, pay_, chg_, inv_)
409state conflict: cart already paid, subscription already cancelled, payment already refunded, PDF not ready yet, or Idempotency-Key already used with a different bodyread the object again; one key per operation
422value rejected: amount, currency, country, return address not allowed, lifetime above carts.maxTTL…errors[]
503your Stripe or PayPal keys are not usable (yet)GET /v1/account: the provider's loaded

Your account is not ready​

GET /v1/account returns ready: false, or a provider with loaded: false:

  1. The secret exists and holds the right keys: sng secret describe stripe-keys (secretKey, publishableKey) or sng secret describe paypal-keys (clientId, clientSecret).
  2. The mode matches the keys: test with test keys, live with production keys.
  3. The keys are not revoked in your Stripe or PayPal dashboard.
  4. The application in identity.applications exists (sng iam app list).

Your customers cannot pay​

What your customer seesCauseFix
"link expired"cart or link past its lifetimecreate a new cart or a new link
No payment method offeredproviders restricted by providers in the cart, or provider not readycheck the cart and GET /v1/account
Card declineddeclined by the bank or by Stripethe customer tries another method; details are in your Stripe dashboard
Authentication requested at every chargerequirement of their banksend action_url; offer PayPal

Periods and charges​

SituationWhat happensTo do
Subscription period declinedsubscription.past_due, new attempts per dunning.retryDelayssend the customer a portal link to change payment method
Retries exhaustedsubscription.unpaid or subscription.canceled depending on dunning.finalActioncontact your customer; create a new subscription if needed
Pay-as-you-go charge requires_action or failedcharge.action_required or charge.failed, with action_urlsend action_url to the customer
Fear of a double charge after re-running your jobnone if the same Idempotency-Key is reusedone stable key per customer and period

Webhooks​

See the "If it does not work" table of the Webhooks page: invalid signature, clock skew, events received several times.

What is not available yet​

These requests are not configuration errors: the feature does not exist yet.

  • Payment page on your own domain.
  • SEPA direct debit.
  • Several currencies in one invoice.
  • Transmission of invoices to e-invoicing platforms (PDP).

Contact support​

If the problem persists, contact support with: the time of the call, the route, the response code, the error detail and the identifier concerned (cart_…, pay_…, inv_…). Never send your Stripe or PayPal keys or your webhook secret.

See also​