API Reference
Complete reference for the SeedhaPe HTTP API. Base URL: https://seedhape.onrender.com
Authentication
All merchant endpoints require a Bearer API key in the Authorization header. Keys start with sp_live_ (production) or sp_test_ (sandbox).
Authorization: Bearer sp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWarning: Never expose your API key in client-side code or commit it to source control. Store it as a server-side environment variable (SEEDHAPE_API_KEY). Public endpoints under /v1/pay/* require no authentication.
Errors
All error responses return a JSON body with error (human-readable message) and code (machine-readable constant).
{
"error": "Order not found",
"code": "ORDER_NOT_FOUND"
}Validation error — check the error.code for details
Invalid or missing API key
Resource not found or belongs to another merchant
Merchant Android device is offline — payments temporarily unavailable
Orders — Authenticated
/v1/orders🔑 Auth requiredCreate a payment order
Creates a new UPI payment order. Returns a UPI deep-link and QR code for the customer to pay. The order ID is embedded in the UPI transaction note (tn) for reliable auto-matching.
Request body (application/json)
amountintegerrequiredbodyAmount in paise. ₹1 = 100 paise. So ₹499 = 49900.
descriptionstringbodyShown on the hosted payment page and in some UPI apps. Max 100 characters.
externalOrderIdstringbodyYour own order ID for deduplication. Echoed back in all webhook payloads.
expectedSenderNamestringbodyPayer's name as shown in their UPI app. Strongly recommended — used as a fallback matching signal when the UPI transaction note is unavailable.
customerEmailstring (email)bodyCustomer email address. Stored on the order for reference.
customerPhonestringbodyCustomer phone number. E.g. +919876543210.
expiresInMinutesintegerbodyOrder time-to-live in minutes. Defaults to 30. After expiry the order moves to EXPIRED and cannot be paid.
metadataobjectbodyArbitrary JSON object. Stored on the order and echoed verbatim in all webhook payloads. Useful for passing userId, planKey, etc.
Example request
curl -X POST "https://seedhape.onrender.com/v1/orders" \
-H "Authorization: Bearer sp_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 49900,
"description": "Pro plan subscription",
"externalOrderId": "your_order_123",
"expectedSenderName": "Rahul Sharma",
"expiresInMinutes": 15,
"metadata": { "userId": "usr_abc", "planKey": "PRO" }
}'201 Response
{
"id": "sp_ord_ab12cd34ef56",
"amount": 49900,
"originalAmount": 49900,
"currency": "INR",
"description": "Pro plan subscription",
"status": "CREATED",
"upiUri": "upi://pay?pa=merchant@ybl&pn=My+Store&am=499.00&tn=sp_ord_ab12cd34ef56&cu=INR",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUh...",
"expiresAt": "2026-03-15T12:34:56.000Z",
"createdAt": "2026-03-15T12:19:56.000Z",
"externalOrderId": "your_order_123",
"metadata": { "userId": "usr_abc", "planKey": "PRO" }
}Responses
Order created — returns full OrderData object
Validation error (e.g. missing amount, amount <= 0)
Invalid or missing API key
Merchant device is offline
/v1/orders/{orderId}🔑 Auth requiredGet order details
Returns the full order object including status, amounts, QR code, and metadata. Use this for server-side order lookup.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID (e.g. sp_ord_ab12cd34ef56).
Example request
curl "https://seedhape.onrender.com/v1/orders/sp_ord_ab12cd34ef56" \
-H "Authorization: Bearer sp_live_YOUR_KEY"Responses
Order found — returns full OrderData object
Invalid or missing API key
Order not found or belongs to another merchant
/v1/orders/{orderId}/status🔑 Auth requiredPoll order status
Lightweight status poll. Returns only id, status, amount, and verifiedAt. Prefer this over fetching the full order when polling from your backend.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID.
Example request
curl "https://seedhape.onrender.com/v1/orders/sp_ord_ab12cd34ef56/status" \
-H "Authorization: Bearer sp_live_YOUR_KEY"200 Response
{
"id": "sp_ord_ab12cd34ef56",
"status": "VERIFIED",
"amount": 49900,
"verifiedAt": "2026-03-15T11:11:09.000Z"
}Responses
Returns id, status, amount, and verifiedAt
Invalid API key
Order not found
Payment Page — Public (no auth)
/v1/pay/{orderId}Get public order data
Returns payment page data for the hosted checkout UI. No authentication required — safe to call from the browser. Returns 503 if the merchant device is offline.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID.
200 Response
{
"id": "sp_ord_ab12cd34ef56",
"amount": 49900,
"originalAmount": 49900,
"currency": "INR",
"description": "Pro plan subscription",
"status": "PENDING",
"upiUri": "upi://pay?pa=merchant@ybl&am=499.00&tn=sp_ord_ab12cd34ef56&cu=INR",
"qrCode": "data:image/png;base64,iVBOR...",
"expiresAt": "2026-03-15T12:34:56.000Z",
"expectedSenderName": "Rahul Sharma"
}Responses
Order data for payment page (PublicOrderData object)
Order not found
Merchant device is offline — payments temporarily blocked
/v1/pay/{orderId}/expectationSet expected payer name
Stores the payer's name on the order to improve fallback matching accuracy. Called by the hosted payment page after the customer enters their name. Only valid for CREATED / PENDING / DISPUTED orders.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID.
Request body (application/json)
expectedSenderNamestringrequiredbodyThe payer's name as it appears in their UPI app. 2–100 characters. Used for fallback matching when the transaction note is missing.
200 Response
{
"ok": true,
"expectedSenderName": "Rahul Sharma"
}Responses
Name saved successfully
Validation error or order is in a terminal state (VERIFIED/EXPIRED/etc.)
Order not found
/v1/pay/{orderId}/screenshotUpload dispute screenshot
Uploads a screenshot of the UPI payment confirmation. Creates or updates a dispute record for manual review. Only accepted for PENDING or DISPUTED orders. File must be an image ≤ 5 MB.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID.
Request body (multipart/form-data)
screenshotfile (binary)requiredbodyImage file in JPEG, PNG, or WebP format. Maximum size 5 MB.
Example request
curl -X POST "https://seedhape.onrender.com/v1/pay/sp_ord_ab12cd34ef56/screenshot" \
-F "screenshot=@/path/to/payment-confirmation.jpg"200 Response
{
"ok": true,
"screenshotUrl": "https://cdn.seedhape.com/disputes/sp_ord_ab12cd34ef56.jpg",
"message": "Screenshot uploaded. Our team will review within 24 hours."
}Responses
Screenshot uploaded, dispute record created/updated
No file provided or order is in wrong state
Order not found
/v1/pay/qr/{orderId}Get QR code as PNG image
Returns the UPI QR code as a raw PNG image (not a data URL). Useful for embedding in emails, PDFs, or custom UIs. Returns 503 if the merchant device is offline.
Path parameters
orderIdstringrequiredpathThe SeedhaPe order ID.
Example usage
<img src="https://seedhape.onrender.com/v1/pay/qr/sp_ord_ab12cd34ef56" alt="Pay with UPI" />attachments: [{
filename: 'payment-qr.png',
path: `https://seedhape.onrender.com/v1/pay/qr/${order.id}`,
}]Responses
PNG image (Content-Type: image/png)
Order not found
Merchant device is offline
Schemas
OrderStatus
The lifecycle state of a payment order. Terminal states are VERIFIED, RESOLVED, EXPIRED, and REJECTED.
Order created, no payment attempt yet
Payment notification received, matching in progress
Payment verified — trigger fulfillment
Payer claims payment but auto-match failed
Dispute manually resolved by merchant
Order TTL elapsed without payment
Dispute rejected by merchant
OrderData
Returned by POST /v1/orders and GET /v1/orders/:id.
idstringSeedhaPe order ID, e.g. sp_ord_ab12cd34ef56
amountintegerFinal amount in paise (may differ from originalAmount if amount was randomized to aid matching)
originalAmountintegerThe amount you requested when creating the order
currencystringAlways "INR"
statusOrderStatusCurrent lifecycle status
upiUristringUPI deep-link for payment apps. Render as a button on mobile.
qrCodestringBase64 PNG data URL of the QR code. Use directly as <img src={order.qrCode} />
expiresAtdate-timeISO 8601 timestamp when the order expires
createdAtdate-timeISO 8601 creation timestamp
verifiedAtdate-time | nullSet when the payment is confirmed (status = VERIFIED or RESOLVED)
externalOrderIdstring | nullYour own order ID, echoed back
descriptionstring | nullOrder description shown on the payment page
metadataobject | nullArbitrary JSON passed at creation, echoed in all webhook payloads
Webhook Event Types
Events are delivered via HTTP POST to your webhook URL. See the Webhooks section in the main docs for signature verification.
order.verifiedPayment confirmed. Trigger order fulfillment. The data object includes utr, senderName, upiApp, verifiedAt.
order.expiredOrder TTL elapsed without a verified payment.
order.disputedPayer claims to have paid but auto-match failed. A dispute screenshot may have been uploaded.
order.resolvedDispute manually resolved. Check data.status: RESOLVED (approve) or REJECTED (decline).
Looking for the SDK or React integration?
Back to Integration Docs