Skip to content

Payments

Payment gateway integration services for websites, apps and portals

Payment gateway integration services connect your website, app or portal to a gateway such as Razorpay, PayU, Cashfree or Stripe, so customers can pay and every payment, refund and settlement is recorded correctly in your own system. Codebrix builds the checkout, the server-side checks, webhooks, refunds and a daily reconciliation, in a merchant account that belongs to your company. Pricing is shared on a call within an hour of your enquiry.

Gateways
Razorpay, PayU, Cashfree, Stripe
Merchant account
In your company's name
Checked daily
Orders against settlements
Pricing
On a call within 1 hour

Updated · By the Codebrix team

What payment gateway integration covers beyond the Pay button

Showing a checkout is the easy part. The work that protects your money happens on the server, after the customer has clicked Pay, and most of it is invisible until something goes wrong. A complete integration has seven parts.

The parts of a complete integration
PartWhat it doesWhat happens if it is missing
Order on the serverCreates the amount and reference on your server before checkout opensA customer can change the amount in the browser
CheckoutThe gateway's payment screen for UPI, cards, netbanking or walletsNothing, this is the part everyone builds
Payment verificationChecks the gateway's signature before an order is marked paidForged success messages unlock goods or services
WebhooksReceives payment, refund and dispute events from the gatewayCustomers who paid are shown as failed
RefundsFull and partial refunds from your admin screen, with a reasonStaff log into the gateway dashboard and records drift
ReconciliationMatches orders, payments and bank settlements every dayMissing money is found by the accountant at year end
Admin screensPayment history per order and customer for your teamSupport asks a developer to look things up

The same parts apply whether the checkout sits in a store, a booking system or a subscription product. For a marketplace that pays sellers, add the split of each payment, covered under marketplace app development.

Choosing a gateway: Razorpay, PayU, Cashfree or Stripe

All four accept the common Indian payment methods, so the choice usually turns on fees for your payment mix, settlement terms, the extra products you need and how quickly your account is approved. The notes below come from each provider's own pages in November 2026.

GatewayWorth a look whenCheck before you commit
RazorpayYou want UPI, cards, netbanking, wallets and EMI from one Indian providerIts Route product for splitting payments asks domestic businesses for turnover above ₹40 lakh in the current or preceding financial year
PayUYou want a standard plan with no setup or annual maintenance feeEMI, Amex, Diners and international cards sit in a higher fee slab, and UPI pricing varies by business type and volume
CashfreeYou want UPI, cards, wallets and bank transfer, plus subscriptionsRead the current new-merchant offer terms, which exclude several card types
Stripe IndiaYou sell to customers abroad and want Stripe's toolsThe standard plan page asks Indian businesses to request an invite

Fees per payment are compared side by side in our payment gateway integration cost guide. Selling mainly to US customers through Stripe is a different job, described on Stripe integration services. For UAE gateways, see payment gateway integration in the UAE.

The server-side checks that stop fake or double payments

Each gateway has its own steps, but the logic is the same. Razorpay's standard checkout guide is a good example of what a correct flow looks like:

  1. Create an order on your server for every payment. Razorpay states that payments made without an order ID cannot be captured and are refunded automatically.
  2. Open checkout with that order ID, so the amount comes from your server, not the browser.
  3. When checkout reports success, compute an HMAC SHA256 digest of your stored order ID and the payment ID using your secret key, and compare it with the signature returned. Razorpay calls this a mandatory step before fulfilment.
  4. Use the order ID saved on your server, not the one returned by checkout, as Razorpay's guide instructs.
  5. Make sure payments are captured. Razorpay's capture settings say authorised payments must be captured within 3 days of creation, and with manual capture, payments not captured in time are refunded automatically.

Secret keys live only on the server and in your secrets store, never in an app bundle or front-end code. Every request that creates or changes money carries a reference that makes a repeat harmless, so a network retry cannot charge a customer twice.

Webhooks: retries, duplicates and events that arrive out of order

A payment often settles after the customer has left the page: the bank confirms late, a UPI app times out, a refund completes. The gateway tells you through a webhook, and each gateway behaves a little differently.

Webhook behaviour from each gateway's documentation, November 2026
RazorpayCashfreeStripe
Proving the senderSignature verification is supportedSignature in x-webhook-signature, built with HMAC SHA256 over the timestamp and the raw payloadStripe-Signature header, verified against the raw body
RetriesExponential backoff for 24 hours; the webhook is disabled if it keeps failing for 24 hoursBy default three retries, at 2, 10 and 30 minutesUp to three days in live mode
DuplicatesThe same event can arrive more than once; x-razorpay-event-id is unique per eventAt-least-once delivery, with an idempotency header on newer webhook versionsLog processed event IDs and skip repeats
OrderEvents may not arrive in orderTreat as unorderedOrder is not guaranteed
ResponseReply with a 2xx within 5 secondsRetries until a 200 responseReturn a 2xx before any slow work
  • Read the raw request body and verify the signature before parsing anything.
  • Store the event, reply with a 2xx at once and process it from a queue.
  • Record each event ID and ignore repeats.
  • When events arrive out of order, fetch the payment's current state from the gateway's API instead of trusting the sequence.
  • Alert someone when a webhook endpoint starts failing, before the gateway disables it.

Sources: Razorpay webhook best practices, Cashfree webhooks and Stripe webhooks.

Refunds, partial refunds and the admin screen

Refunds deserve a proper screen, because they are where staff make costly mistakes. Razorpay's refunds documentation says a normal refund reaches the customer within 5-7 working days, an instant refund almost immediately but can fail because of the customer's bank, several partial refunds are allowed up to the captured amount, and normal refunds are not possible on payments more than 6 months old.

  • Refunds start from the order in your admin, so the record and the money move together.
  • Each refund needs a reason, and amounts above a limit you set need a second person's approval.
  • Partial refunds show what remains refundable.
  • The customer gets an email or WhatsApp message with the refund reference.
  • A refund that fails at the bank shows as failed, with the next step for staff.

Reconciliation: matching orders, payments and bank settlements

Money does not reach your bank at the moment of payment. Razorpay's settlements page gives a standard cycle of T+2 working days for domestic payments and T+7 for international ones, and says the settled amount is reduced by Razorpay's fee, GST on that fee, refunds and adjustments. A daily job compares three records so nothing slips.

CheckComparesCatches
Paid ordersYour orders marked paid against captured payments at the gatewayOrders fulfilled without payment, or payments with no order
RefundsRefunds in your admin against refunds at the gatewayRefunds made in the dashboard and never recorded
SettlementsSettlement reports against bank creditsShort or missing settlements and unexpected deductions
FeesFee and tax per payment against the rate you agreedWrong pricing applied to your account

Testing, go-live and how pricing works

Everything is built against the gateway's test mode first. A sensible test list covers a successful payment, a decline, a customer who closes the page mid-payment, a duplicate webhook, a late webhook, a partial refund and a failed refund. Our software testing services page explains how such cases are scripted and repeated before each release. Going live is a switch to live keys followed by a small real payment and refund by your own team.

Payment gateway integration is often one part of a larger build, such as an ecommerce app or a fintech app. On its own, the effort depends on how many platforms take payment, how many gateways you use, refunds, subscriptions, split payments and reconciliation. We do not publish prices. Describe the flows in the enquiry form; the team calls back within an hour, at any hour, 7 days a week, shares pricing on that call and then sends a written fixed-price proposal with milestones. Gateway approval of your merchant account is on the provider's side and can move the schedule.

Frequently asked questions

What do payment gateway integration services include?

A complete job covers creating orders on the server, the checkout itself, signature verification before an order is marked paid, webhook handling for late or repeated events, full and partial refunds from your admin, a daily reconciliation of orders against payments and settlements, and test runs of every failure case. The merchant account, keys and dashboard stay in your company's name.

Which payment gateway is best for a website in India?

There is no single best one. Razorpay, PayU and Cashfree all take UPI, cards and wallets; the right choice depends on your payment mix, the fees for it, settlement terms, extra products such as subscriptions or split payments, and how quickly your account is approved. Compare the published rate cards against your own last three months of sales.

Do I need a developer to integrate Razorpay?

For a payment link or a hosted payment page, often not. For a checkout inside your own site or app, yes: Razorpay's own guide requires an order created on your server and a signature check on your server before you fulfil the order. Webhooks, refunds and reconciliation also need server code that someone maintains.

Why does a payment show failed when the customer was charged?

Usually because the site trusted the browser's message and the customer closed the page, lost signal or the bank confirmed late. The fix is a webhook handler that updates the order when the gateway's event arrives, plus a check of the payment's current status through the gateway's API. A daily reconciliation catches any case both missed.

Can one website use two payment gateways?

Yes. A common setup uses an Indian gateway for UPI and domestic cards and a second provider for international cards, or keeps a second Indian gateway as a fallback. Each gateway needs its own verification, webhooks, refunds and reconciliation, so two gateways cost more to build and to maintain than one.

How do refunds work after payment gateway integration?

Staff start a full or partial refund from the order in your admin screen, with a reason, and the system calls the gateway's refund API and records the result. Razorpay says normal refunds reach customers within 5-7 working days and instant refunds almost immediately, as of November 2026. Failed refunds show clearly so staff can act.

Sources

  • Cost guide

    Payment gateway integration cost: the build and the fee on every payment

    Payment gateway integration cost has two parts: the build and the fee on every payment. Razorpay, PayU, Cashfree and Stripe India fees compared, dated.

    Read more
  • Payments, US

    Stripe integration services: Checkout, Billing, Connect and webhooks done properly

    Stripe integration services for US companies: Checkout or Elements, Billing, webhooks, Stripe Tax and Connect, built in your own Stripe account and tested.

    Read more
  • Shopping apps

    Ecommerce app development: a shopping app for the store you already run

    Ecommerce app development for iOS and Android: a shopping app on your Shopify store or a custom backend, with push, payments and accounts in your name.

    Read more
  • Fintech apps

    Fintech app development for payments, lending, wallet and investing products

    Fintech app development for payments, lending, wallets and investing, built around your regulated partner, RBI rules and a reconciled ledger. Fixed price.

    Read more
  • Marketplace apps

    Marketplace app development: buyers, sellers, payouts and the rules between them

    Marketplace app development company for multi-vendor platforms: seller KYC, split payouts via Razorpay Route or Stripe Connect, commissions and disputes.

    Read more
  • Web applications

    Custom web application development services for portals, dashboards and internal tools

    Web application development services for portals, dashboards and internal tools: roles, Postgres, integrations and tests. Fixed price, code in your name.

    Read more

Tell us what you need

Our team calls you within 1 hour with pricing.

What do you need? (tap any)
Or message us on WhatsApp

We call within 1 hour, any time. Privacy policy

Start a project