Billing

Embed
Preview of the card
<a href="https://shippified.net/docs/ref-billing"><img src="https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/pages/1a28f2c6-08bd-48e5-94b6-fd4fdbce6312/social-card.svg?v=4bd9898cfc89" alt="Billing" width="600" height="315"></a>
GET https://shippified.net/api/billing/usage

Current plan, this-month order usage, monthly cap, and reset timestamp.

Code samples

cURL
curl -X GET "https://shippified.net/api/billing/usage"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
{
  "ok": true,
  "plan": "free",
  "used": 0,
  "cap": null,
  "resetsAt": null,
  "windowStart": "string",
  "stripeConfigured": true,
  "subscriptionStatus": "string",
  "subscriptionPeriodEnd": "string",
  "subscriptionPriceId": "string"
}
POST https://shippified.net/api/billing/checkout

Create a Stripe Checkout session for upgrading to Pro. Returns a hosted URL.

Request body

application/json
plan
string
required
successUrl
string
cancelUrl
string
{
  "plan": "monthly",
  "successUrl": "string",
  "cancelUrl": "string"
}

Code samples

cURL
curl -X POST "https://shippified.net/api/billing/checkout" \
  -H "Content-Type: application/json" \
  -d '{"plan":"monthly","successUrl":"string","cancelUrl":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Checkout URL.
{
  "url": "string",
  "sessionId": "string"
}
503 Stripe is not configured on this deployment.
POST https://shippified.net/api/billing/portal

Create a Stripe Customer Portal session for managing the current subscription.

Request body

application/json
returnUrl
string
{
  "returnUrl": "string"
}

Code samples

cURL
curl -X POST "https://shippified.net/api/billing/portal" \
  -H "Content-Type: application/json" \
  -d '{"returnUrl":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Portal URL.
503 Stripe is not configured.
POST https://shippified.net/api/webhooks/stripe

Stripe webhook endpoint. Verified via STRIPE_WEBHOOK_SECRET. NOT for client use.

Code samples

cURL
curl -X POST "https://shippified.net/api/webhooks/stripe"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Event handled.
400 Signature verification failed.
Updated