Skip to main content
AI-Powered Financial Infrastructure Global Payments Secure & Trusted
24×7 Support

AI-Powered Financial InfrastructureGlobal PaymentsSecure & Trusted

Developers · Integration Guide

From sandbox key to first live payment.

The steps every Paynancial integration goes through — in order, with the page that covers each one in detail.

  • Seven steps
  • Sandbox first
  • Go-live checklist
Before you start

Choose what you are integrating.

Each product maps to one API resource. Start with the one that matches how your business gets paid or pays out.

Products and their API resources
If you want to…IntegrateAPI resource
Create a payment to accept money from a customer.Payment GatewayPOST /payments
Refund all or part of an existing payment.RefundsPOST /refunds
Send money to a beneficiary's bank account or UPI ID.PayoutsPOST /payouts
Create a shareable link a customer can pay without a checkout on your site.Payment LinksPOST /payment_links
Collect recurring or scheduled payments from a customer.Smart CollectionsPOST /collections
Generate a transaction report for a date range, for your finance team or accounting system.Payment AnalyticsPOST /reports/transactions
Step by step

Seven steps to a production integration.

  1. 01
    Request sandbox access

    Ask for a sandbox API key. Everything you build before going live runs against the sandbox, with no real money involved. Sandbox →

  2. 02
    Authenticate

    Store the key on your server and send it with every request using HTTP basic authentication. Authentication →

  3. 03
    Make your first call

    Create a payment (or a payment link, payout or collection) and read the resource the API returns. API Reference →

  4. 04
    Receive webhooks

    Set up an HTTPS endpoint so you learn about payments, payouts, refunds and settlements as they happen. Webhooks →

  5. 05
    Handle errors and retries

    Branch on the error code, and send an idempotency key with every write so a retry never creates a duplicate. Errors & idempotency →

  6. 06
    Test the unhappy paths

    Timeouts, declined payments, duplicate webhooks and rate limits — test each one in the sandbox. Test scenarios →

  7. 07
    Go live

    Swap in your live key on your server, confirm the go-live checklist below, and monitor your first live transactions closely. Checklist →

Step 3 in detail

Your first API call.

Set up a client with your sandbox key and create a payment. Amounts are in paise, so 50000 is ₹500.00, and receipt is your own order reference.

Set up a client
$client = new Paynancial\Client('YOUR_API_KEY');
const client = new Paynancial({ key: 'YOUR_API_KEY' });
client = paynancial.Client('YOUR_API_KEY')
curl https://api.paynancial.com/v1/payments \
  -u YOUR_API_KEY:
Create a payment
$payment = $client->payments->create([
    'amount'   => 50000, // in paise
    'currency' => 'INR',
    'receipt'  => 'order_rcpt_101',
]);

echo $payment->id;
const payment = await client.payments.create({
  amount: 50000,
  currency: 'INR',
  receipt: 'order_rcpt_101',
});

console.log(payment.id);
curl https://api.paynancial.com/v1/payments \
  -u YOUR_API_KEY: \
  -d amount=50000 \
  -d currency=INR \
  -d receipt=order_rcpt_101
Go-live checklist

Before you switch to a live key.

Live key on the server only
The live key is loaded from an environment variable or secrets manager, never from code in a repository or anything a customer can download.
Sandbox and live kept apart
Development and test environments still use sandbox keys, so a test can never move real money.
Every write is idempotent
Payments, refunds and payouts are sent with an idempotency key, and retries reuse it.
Errors are handled by code
Your integration branches on error codes such as insufficient_funds, invalid_method and rate_limited.
Webhook handler is robust
It responds quickly, skips duplicates, does not depend on arrival order, and you have confirmed with support how to verify the source.
Someone is watching
You know who monitors the first live transactions, and how to reach Paynancial developer support if something looks wrong.
FAQ

Integration questions.

How long does a Paynancial integration take?

It depends on what you are building and how much of it you test. A first API call is a few lines of code; a production integration also needs webhooks, error handling and testing, which is where most of the time goes.

What do I need before I start?

A sandbox API key, a server that can make HTTPS requests and keep a key secret, and an HTTPS endpoint if you plan to receive webhooks.

Which product should I integrate first?

The one that matches how you get paid: the Payment Gateway for checkout, Payment Links to get paid without a checkout, Smart Collections for recurring or scheduled payments, and Payouts to send money out.

When am I ready to go live?

When every item on the go-live checklist on this page is done: your integration handles failures and retries, your webhook handler copes with duplicates, and your live key is stored only on your server.

Start step one today.

Request a sandbox key and build your integration with no real money involved.