Get up and running with GroskoPay APIs in minutes. All endpoints are versioned under /api/public/v1.
Sign in, complete onboarding, then visit API Keys in the merchant dashboard to generate a test key. Every key has a key_id (public) and a secret shown only once at creation.
Pass your key on every request as an Authorization header:
Authorization: Basic base64(key_id:secret)
# or, more commonly:
X-Grosko-Key-Id: gpk_test_abc123
X-Grosko-Key-Secret: <plaintext-secret>POST /api/public/v1/payments
Content-Type: application/json
X-Grosko-Key-Id: gpk_test_...
X-Grosko-Key-Secret: ...
{
"amount": 49900, // paise
"currency": "INR",
"method": "upi",
"customer_email": "user@example.com",
"customer_phone": "+919999999999",
"metadata": { "order_id": "ord_1" }
}Response returns a txn_ref (unique, prefixed with gp_txn_) and a simulated status. In sandbox, ~92% of requests are auto-marked succeeded and the rest failed.
GET /api/public/v1/payments/:txn_ref
X-Grosko-Key-Id: ...
X-Grosko-Key-Secret: ...All errors are returned as JSON { "error": { "code", "message" } } with an appropriate HTTP status. 401 — missing or invalid credentials. 422 — validation error. 404 — not found.