Hand off a completed Checkout Session
Hand the new subscription to Sphere so renewals are taxed when they're invoiced.
Hand a completed Checkout Session's subscription to Sphere
post/stripe/checkout_sessions/{external_id}/complete
Call from your checkout.session.completed handler. Hands the new subscription over to Sphere so each renewal is taxed when it's invoiced, rather than reusing the rates from checkout. The first invoice is unaffected. Safe to call more than once.
Authorizations
X-API-KEYstringRequired
Path parameters
external_idstringRequired
The Stripe Checkout Session id, e.g. cs_test_a1B2c3.
Body
stripe_account_idstring · nullableOptionalDefault:
nullPattern: ^acct_Responses
200Success
application/json
The Stripe objects the session produced, and what Sphere changed on them.
stripe_account_idstringRequired
403
Missing/invalid API key, or Stripe account not enabled for Sphere tax.
404
No such connected account or Checkout Session.
409
The session wasn't created or taxed through Sphere.
502
Stripe refused the cleanup.
post/stripe/checkout_sessions/{external_id}/complete
POST /v1/stripe/checkout_sessions/{external_id}/complete HTTP/1.1
Host: api.getsphere.com
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"stripe_account_id": "text"
}{
"stripe_account_id": "text",
"stripe": {
"id": "text",
"subscription_id": "text",
"invoice_id": "text",
"payment_intent_id": "text"
},
"sphere": {
"status": "cleaned",
"stripped_tax_rate_ids": [
"text"
]
}
}Last updated
Was this helpful?