Skip to main content
After a user completes payment, use this endpoint to find out what they bought.

Endpoint

GET /api/stripe/receipt

Parameters

session_id
string
required
The Stripe Checkout session ID from the redirect URL
shareId
string
required
Your project’s Share ID (to find the Stripe account)

Response

planName
string
Name of the purchased plan (e.g. “Pro” or “Custom Plan”)
customPlan
boolean
Whether this was a custom plan
total
number
Total amount charged
currency
string
Currency code
customer.email
string
Customer’s email address
billingInterval
string
“month” or “year”
subscriptionId
string
Stripe subscription ID
metadata
object
Contains planId (regular plans) or featureDetails_* keys (custom plans)

Example

curl "https://cuprice.io/api/stripe/receipt?session_id=cs_live_abc123&shareId=nTZ7axXQHU"
{
  "planName": "Pro",
  "customPlan": false,
  "total": 29,
  "currency": "USD",
  "customer": { "email": "user@example.com" },
  "billingInterval": "month",
  "subscriptionId": "sub_abc123",
  "metadata": {
    "planId": "101",
    "projectId": "203"
  }
}