Integrate with SinhaPay

REST endpoints for merchant-generated invoices and read-only verification.

API credentials

Log in to your Merchant Dashboard and create two independent API Keys: Create invoices and Verify invoices & transactions. Store the keys on your backend, never in browser JavaScript or a public repository. Requests use the Authorization: Bearer <KEY> header.

This development release cannot automatically mark an invoice COMPLETED based on SMS alone. The transaction verification endpoint provides SMS evidence only. Independent wallet-provider settlement confirmation is required before crediting customer balances.

1. Create an invoice

POST /api/v1/invoices

INVOICE.CREATE CREDENTIAL
{
  "amount": "50.00",
  "order_id": "ORDER-1001",
  "customer_id": "CUS-1001",
  "customer_name": "Customer"
}

Response:
{
  "invoice_id": "INV...unique...",
  "payment_url": "https://sinhapay.top/d/...50",
  "payment_status": "PENDING"
}

A repeated order_id with the same customer and amount returns the original invoice. Changing customer or amount for that order is rejected.

2. Verify an invoice

POST /api/v1/invoices/verify

INVOICE.VERIFY CREDENTIAL
{ "invoice_id": "INV..." }

Response:
{
  "invoice_id": "INV...",
  "status": "PENDING_REVIEW",
  "independently_confirmed": false
}

You can also call GET /api/v1/invoices/{invoice_id} and POST /api/v1/transactions/verify using a verification credential.

3. Review transaction evidence

POST /api/v1/transactions/verify

INVOICE.VERIFY CREDENTIAL
{
  "transaction_id": "EXAMPLE123",
  "amount": "50.00"
}

Response may be:
{
  "found": true,
  "status": "SMS_EVIDENCE_ONLY",
  "provider_confirmed": false
}

Transaction IDs cannot be reused for another invoice. Public checkout pages never disclose merchant API keys, customer identifiers or full device metadata.

Webhook delivery — planned integration

Signed and retried merchant webhooks will be available after an authorized, independent payment-confirmation provider has been integrated and end-to-end tested. There is no production auto-credit API in this source release.

☏