Developers
Built for the team that has to integrate it
A REST API that behaves, webhooks that retry, and a sandbox that mirrors production.
Predictable JSON, idempotency keys on every write, signed webhooks with exponential backoff, and a sandbox seeded with the same edge cases you will hit on day one.
One API, every method
Create a payment, get a redirect or a set of instructions back, and receive a signed webhook when the state changes. The method your customer picks does not change your integration.
- Lightning fast
- Bank-level security
- Flexible integration
- Comprehensive docs
- 24/7 support
- Highly scalable
Create a payment
A single call, whichever method the customer chose.
bash
curl -X POST https://api.parsfinans.io/v1/payments \
-H "Authorization: Bearer $PARSHAVALE_SECRET_KEY" \
-H "Idempotency-Key: 7f3c9b1e-2a4d-4c8e-9f10-5b6c7d8e9f00" \
-H "Content-Type: application/json" \
-d '{
"amount": 145000,
"currency": "TRY",
"method": "papara",
"reference": "order_10482",
"customer": { "id": "cus_9931", "email": "[email protected]" },
"return_url": "https://yourapp.com/checkout/return"
}'Handle the webhook
Signed, retried, and safe to process twice.
typescript
import crypto from "node:crypto";
export function verify(rawBody: string, signature: string) {
const expected = crypto
.createHmac("sha256", process.env.PARSHAVALE_WEBHOOK_SECRET!)
.update(rawBody)
.digest("hex");
// Constant-time compare — never use === on a signature.
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}
export async function POST(request: Request) {
const raw = await request.text();
if (!verify(raw, request.headers.get("x-parshavale-signature") ?? "")) {
return new Response("invalid signature", { status: 401 });
}
const event = JSON.parse(raw);
// Delivered at least once: key your handler on event.id and exit early if seen.
if (event.type === "payment.settled") {
await markOrderPaid(event.data.reference, event.data.amount);
}
return new Response("ok");
}Get your API credentials
Sandbox keys are issued the moment your account is opened. Tell us what you are building and we will get you a key and an engineer on the same thread.
Direct channels
İstanbul, Türkiye · 7/24