Payments API
The only money that moves through a public API on Appsinity is a donation to a developer. The proxy exists so the Razorpay secret key never reaches a browser, and it exposes exactly two endpoints.
Open Appsinity StudioThe two endpoints
POST https://<payments-worker>/create-order
Content-Type: application/json (no Authorization header)
{
"amount": 5, // in currency units, not paise
"currency": "USD", // defaults to USD
"gameId": "my-game", "gameName": "My Game",
"developerUid": "...", "developerName": "...",
"userId": "...", "userEmail": "...", "country": "IN"
}
200 {
"keyId": "rzp_live_...", // publishable key, safe for the browser
"orderId": "order_...",
"amount": 500, // paise: amount x 100
"currency": "USD"
}
400 { "error": "Donation amount must be between $1 and $15,000." }
502 { "error": "<Razorpay's own description>" }Verifying the payment
- The expected signature is HMAC-SHA256 over
"<order_id>|<payment_id>"keyed with the secret. - The comparison is length-checked and constant-time on the worker side.
- The worker returns the identifiers you sent back to you; it does not record the donation itself.
- Nothing here is authenticated, so the caller must be the one completing checkout.
POST https://<payments-worker>/verify-payment
{
"razorpay_order_id": "order_...",
"razorpay_payment_id": "pay_...",
"razorpay_signature": "<hex>",
"gameId": "my-game", "userId": "..."
}
200 { "ok": true, "orderId": "order_...", "paymentId": "pay_...", ... }
400 { "ok": false, "error": "Missing Razorpay payment verification fields." }
400 { "ok": false, "error": "Invalid Razorpay signature." }Limits and sanitising
- Amounts are rounded to two decimals before the range check.
- Currency is upper-cased and trimmed to three characters.
- Free-text fields are whitespace-collapsed and truncated: names and ids to 80, emails to 120, country to 8.
- A receipt is generated as
don_<timestamp>_<8-char uuid>.
| Currency | Minimum | Maximum | Message shown |
|---|---|---|---|
| USD | 1 | 15,000 | Donation amount must be between $1 and $15,000. |
| INR | 1 | 15,000 | Donation amount must be between ₹1 and ₹15,000. |
| Any other | 0.01 | 100,000,000 | ... the supported range for the selected currency. |
What payments does not include
There is no paid download, no in-app purchase, no subscription and no price field on a listing. The store's own monetisation is a visit-based payout model, and that number is computed from analytics, not from a payment processor.
| Capability | Status |
|---|---|
| Paid downloads | Not available |
| In-app purchases | Not available |
| Subscriptions | Not available |
| Refunds endpoint | None; refund policy is a documented stance, not an API |
| Payout initiation | Studio request rows, no API |
| Invoices or tax documents | Not generated |
| Webhooks | Not available, see Webhooks |
| Card storage | Never on Appsinity |
Frequently asked questions
Where do I put my Razorpay keys?
You do not. They are environment secrets on the Appsinity payments Worker. What you receive per order is the publishable key id, which is safe to hand to the browser checkout.
Can I take payments for my own game?
Only outside Appsinity, with your own processor and your own compliance. The listing then has to describe that honestly, see Paid apps.
Is the donation money sent to me?
It is routed to the developer identified in the order notes. Payout mechanics are documented in Payouts, not here.
Why is my verify call returning Invalid Razorpay signature?
The order id or payment id was not the pair Razorpay issued, or the checkout handed you a handler event before the payment settled. Verify with the exact values from the successful handler payload.
Developer publishing support: [email protected]
General support: [email protected]
Partnerships: [email protected]
APPSINITY