Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dishant0406/quickleap/llms.txt
Use this file to discover all available pages before exploring further.
Payment history and billing
Retrieve payment transaction history and billing summaries for the authenticated user.
Get payment history
Retrieve a paginated list of payment transactions.
getPaymentHistory(params?: PaymentHistoryParams): Promise<PaymentHistoryResponse>
Route: GET /payment/history
Parameters
Page number for pagination
Number of transactions per page (max 100)
Response
Whether the request was successful
Array of transaction objectsShow transaction properties
Unique transaction identifier
Transaction type: payment, refund, subscription_cycle, setup_fee
Payment status: succeeded, failed, pending, refunded, partially_refunded
Transaction amount in smallest currency unit (cents)
Three-letter ISO currency code (e.g., “usd”, “eur”)
Payment provider (e.g., “stripe”)
Transaction ID from the payment provider
Tax amount in smallest currency unit
Amount refunded (if applicable)
ISO 8601 timestamp when payment succeeded
ISO 8601 timestamp when refund was processed
ISO 8601 timestamp when payment failed
ISO 8601 timestamp when transaction was created
Total number of transactions
Example
import { getPaymentHistory } from '@/lib/api/payment';
const response = await getPaymentHistory({
page: 1,
limit: 20
});
if (response.success) {
response.data.transactions.forEach(txn => {
console.log(`${txn.type}: $${txn.amount / 100} - ${txn.status}`);
});
console.log(`Page ${response.data.pagination.page} of ${response.data.pagination.totalPages}`);
}
Response example
{
"success": true,
"data": {
"transactions": [
{
"id": "txn_abc123",
"userId": "user_123",
"subscriptionId": "sub_456",
"planId": "plan_pro",
"provider": "stripe",
"providerTransactionId": "pi_xyz789",
"type": "payment",
"status": "succeeded",
"amount": 2900,
"currency": "usd",
"taxAmount": 290,
"paidAt": "2024-01-15T10:30:00Z",
"receiptUrl": "https://pay.stripe.com/receipts/...",
"invoiceUrl": "https://invoice.stripe.com/i/...",
"plan": {
"id": "plan_pro",
"name": "Professional",
"pricing": {
"amount": 2900,
"currency": "usd",
"interval": "month"
}
},
"createdAt": "2024-01-15T10:25:00Z"
}
],
"pagination": {
"total": 45,
"page": 1,
"limit": 10,
"totalPages": 5
}
},
"message": "Payment history retrieved successfully"
}
Get billing summary
Retrieve a comprehensive billing summary including current plan, subscription status, recent transactions, and usage statistics.
getBillingSummary(): Promise<BillingSummaryResponse>
Route: GET /payment/billing
Response
Whether the request was successful
Current plan details including name, pricing, limits, and features
Current subscription summaryShow subscription properties
When current billing period ends
Whether subscription will cancel at period end
Most recent 5 transactions
Number of redirects currently active
Total analytics hits this billing period
When usage stats were last updated
Example
import { getBillingSummary } from '@/lib/api/payment';
const response = await getBillingSummary();
if (response.success) {
const { currentPlan, subscription, usageStats } = response.data;
console.log(`Plan: ${currentPlan.name}`);
console.log(`Redirects: ${usageStats.redirectsUsed}/${currentPlan.limits.maxRedirects}`);
console.log(`Analytics: ${usageStats.totalAnalyticsEvents}`);
if (subscription) {
console.log(`Status: ${subscription.status}`);
console.log(`Renewal: ${subscription.currentPeriodEnd}`);
}
}
Transaction types
- payment - Regular subscription charges
- refund - Refunded amounts
- subscription_cycle - Recurring billing cycle charges
- setup_fee - One-time setup charges
Transaction statuses
- succeeded - Payment processed successfully
- failed - Payment failed (card declined, insufficient funds, etc.)
- pending - Payment is being processed
- refunded - Payment was fully refunded
- partially_refunded - Part of the payment was refunded
All monetary amounts are returned in the smallest currency unit (e.g., cents for USD). Divide by 100 to get the dollar amount.
Next steps
Manage subscription
View and manage subscriptions
Create checkout
Subscribe to a plan