Authentication
All API requests (except registration and login) require a bearer token in the Authorization header. Obtain a token by logging in or registering.
POST https://api.receiptiq.ai/v1/api/auth/login
Content-Type: application/json
{
"email": "you@example.com",
"password": "yourpassword"
}
// Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}GET https://api.receiptiq.ai/v1/api/receipts
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/jsonEndpoints
/api/auth/registerCreate a new user account and receive an authentication token.
{
"email": "user@example.com",
"password": "secret123",
"name": "Jane Smith" // optional
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}/api/auth/loginAuthenticate with email and password to receive a bearer token.
{
"email": "user@example.com",
"password": "secret123"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}/api/receiptsList all receipts for the authenticated user, sorted by upload date descending.
// No request body. Pass Authorization header:
// Authorization: Bearer <token>[
{
"id": "rcpt_abc123",
"vendor": "Staples",
"total": 42.99,
"currency": "USD",
"date": "2026-03-15",
"status": "done",
"created_at": "2026-03-15T14:22:00Z"
},
...
]/api/receipts/uploadUpload a receipt image or PDF. Accepts multipart/form-data with a "file" field. Returns the created receipt object immediately with status "processing".
// multipart/form-data
// Field: file (image/jpeg, image/png, application/pdf){
"id": "rcpt_xyz789",
"status": "processing",
"vendor": null,
"total": null,
"currency": null,
"date": null,
"created_at": "2026-04-05T09:11:00Z"
}/api/receipts/:idRetrieve a single receipt with full extracted data including line items.
// No request body.
// Replace :id with the receipt ID, e.g. /api/receipts/rcpt_abc123{
"id": "rcpt_abc123",
"vendor": "Staples",
"total": 42.99,
"currency": "USD",
"date": "2026-03-15",
"status": "done",
"line_items": [
{ "description": "A4 Paper (500 sheets)", "quantity": 2, "unit_price": 14.99, "total": 29.98 },
{ "description": "Ballpoint Pens (12pk)", "quantity": 1, "unit_price": 13.01, "total": 13.01 }
],
"created_at": "2026-03-15T14:22:00Z"
}/api/receipts/:id/export/csvDownload the receipt and its line items as a CSV file. Returns a file attachment.
// No request body. Replace :id with the receipt ID.// Response: Content-Type: text/csv
// Content-Disposition: attachment; filename="receipt_abc123.csv"
id,vendor,total,currency,date,description,quantity,unit_price,line_total
rcpt_abc123,Staples,42.99,USD,2026-03-15,A4 Paper (500 sheets),2,14.99,29.98
rcpt_abc123,Staples,42.99,USD,2026-03-15,Ballpoint Pens (12pk),1,13.01,13.01/api/receipts/:id/retryRe-run AI extraction on a receipt that failed or returned incomplete data.
// No request body. Replace :id with the receipt ID.{
"id": "rcpt_abc123",
"status": "processing",
"vendor": null,
"total": null,
"created_at": "2026-03-15T14:22:00Z"
}/api/searchSemantic and keyword search across all uploaded receipts. Supports natural language queries.
{
"query": "coffee shop January"
}{
"query": "coffee shop January",
"results": [
{
"id": "rcpt_def456",
"vendor": "Blue Bottle Coffee",
"total": 8.50,
"date": "2026-01-12",
"score": 0.94
},
...
]
}/api/billing/statusGet the current billing status, plan, and upload quota for the authenticated user.
// No request body.{
"plan": "starter",
"uploads_used": 47,
"limit": 200,
"has_subscription": true
}/api/billing/create-checkoutCreate a Stripe Checkout session for upgrading to a paid plan. Redirect the user to the returned URL.
{
"plan": "starter" // "starter" | "pro"
}{
"url": "https://checkout.stripe.com/pay/cs_test_..."
}/api/billing/create-portalCreate a Stripe Customer Portal session for managing subscription, payment method, or cancellation.
// No request body.{
"url": "https://billing.stripe.com/session/..."
}Webhooks
ReceiptIQ uses Stripe webhooks to keep billing in sync. Stripe sends signed POST requests to /api/billing/webhook. The endpoint verifies the Stripe signature before processing.
checkout.session.completedFired when a user completes a Stripe Checkout session. ReceiptIQ activates the subscription and increments the upload limit.
customer.subscription.updatedFired when a subscription is modified — e.g. plan change, renewal, or payment failure. ReceiptIQ updates the plan and limit accordingly.
customer.subscription.deletedFired when a subscription is cancelled. ReceiptIQ downgrades the account to the Free plan at the end of the billing period.
Rate Limits
Rate limits are enforced per user account. When exceeded, the API returns a 429 Too Many Requests response with a Retry-After header.