Stripe-hosted Checkout
Instructions on how to setup Sphere's API while using Stripe-hosted Checkout
Overview
Step 1: Call the Sphere Tax Calculation API
curl -X \
POST https://server.getsphere.com/tax_api/calculate_tax \
-H \
"Content-Type: application/json" \
-H \
"X-API-KEY: sph_api_key" \
-d '{
"customer_address": {
"address1": "Investors Boulevard",
"city": "Myrtle Beach",
"state": "SC",
"postal_code": "29579",
"country": "US"
},
"line_items": [
{
"amount": 10000,
"product_id": "prod_RArEhwhXLfX5jF",
"discount_amount": 0,
"tax_inclusive": false
}
],
"currency": "usd"
}'
Step 2: Create Stripe Tax Rate Objects
Step 3a: Create the Stripe Checkout Session
1. Subscription Checkout Session
Step 3b: Direct Invoice Creation (One-Time Payment)
Last updated