AppsinityAPPSINITY
APIs

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 Studio

The 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>" }
Note: The amount is in units on the way in and in the smallest unit on the way out. Multiplying twice charges a hundredfold, so check the field you are reading.

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." }
Watch out: Verify before you acknowledge a donation. Skipping the signature check is how a browser-side callback gets forged, and there is no server-side reconciliation to catch it afterwards.

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>.
CurrencyMinimumMaximumMessage shown
USD115,000Donation amount must be between $1 and $15,000.
INR115,000Donation amount must be between ₹1 and ₹15,000.
Any other0.01100,000,000... the supported range for the selected currency.
Note: Anything outside an unlisted currency's range fails with the generic label rather than a number, which is the first hint that the currency was not the one you meant.

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.

CapabilityStatus
Paid downloadsNot available
In-app purchasesNot available
SubscriptionsNot available
Refunds endpointNone; refund policy is a documented stance, not an API
Payout initiationStudio request rows, no API
Invoices or tax documentsNot generated
WebhooksNot available, see Webhooks
Card storageNever on Appsinity
Not available: Do not advertise a price on a listing. The store cannot charge for it, so the only outcome is a player sent to an external checkout you are responsible for.

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.

Need help?

Developer publishing support: [email protected]
General support: [email protected]
Partnerships: [email protected]