curl https://zeplo.ai/api/payment/status/txn_123 \
-H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
{
"success": true,
"data": {
"sessionId": "cs_abc123...",
"url": "https://checkout.stripe.com/c/pay/cs_abc123..."
}
}
Payments
POST Initiate Payment
Start a payment transaction.
POST
/
api
/
payment
/
initiate
curl https://zeplo.ai/api/payment/status/txn_123 \
-H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
{
"success": true,
"data": {
"sessionId": "cs_abc123...",
"url": "https://checkout.stripe.com/c/pay/cs_abc123..."
}
}
Initiate payment
POST /api/payment/initiate
Initiate a payment for a subscription plan.
Headers
string
required
Session cookie (login via POST /api/auth/login)
Body parameters
integer
required
Plan to purchase.
string
required
Payment gateway (
stripe, razorpay, paypal, paystack, mercadopago).string
Redirect URL on success.
string
Redirect URL on cancel.
{
"planId": 2,
"gateway": "stripe",
"successUrl": "https://your-app.com/success",
"cancelUrl": "https://your-app.com/cancel"
}
Response (Stripe)
{
"success": true,
"data": {
"sessionId": "cs_abc123...",
"url": "https://checkout.stripe.com/c/pay/cs_abc123..."
}
}
Response (Razorpay)
{
"success": true,
"data": {
"orderId": "order_abc123",
"key": "rzp_live_...",
"amount": 2999,
"currency": "INR"
}
}
Get payment status
GET /api/payment/status/:transactionId
string
required
Transaction ID.
curl https://zeplo.ai/api/payment/status/txn_123 \
-H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
