Skip to content
GuidesIntegration & selection

Payment gateway integration checklist: what developers need to get right

Published 5 min readKaazPay payments research team

Short answer

A solid payment gateway integration keeps keys on the server, signs every request, allow-lists fixed server IPs, verifies every webhook, models every order and payout state, tests failure cases as carefully as success, and reconciles daily from the first day live. With KaazPay this happens in four steps: open an account, receive API keys, integrate with engineer support and joint testing, then go live.

Key takeaways

  • Creating a payment is straightforward; most issues arise in notifications, status handling and retries.
  • Keep keys server-side, sign every request and verify every notification signature.
  • Design for asynchronous methods: some payments complete hours after the buyer leaves.
  • Write a test matrix that covers failures, duplicates and timeouts for every method you launch.
  • Plan go-live as a controlled rollout with alerts and daily reconciliation.
In this article
  1. 01What should you decide before writing any code?
  2. 02How should you secure keys, requests and network access?
  3. 03How do you build a reliable notification (webhook) handler?
  4. 04Which order and payout states must your system handle?
  5. 05What should your test plan cover?
  6. 06Which integration mistakes cause the most problems later?
  7. 07What does a safe go-live look like?
  8. 08How do you start integrating with KaazPay?

Questions this article answers

  • “What should our developers check before integrating a payment gateway API?”
  • “How should we handle payment webhooks so customers are never credited twice?”
  • “Which test cases should we run before going live with a new payment provider?”
  • “Why does a payment gateway need our server IP addresses?”
  • “What payment statuses do we need to handle for bank transfers and vouchers?”

What should you decide before writing any code?

A few decisions shape the whole integration, so settle them with product and finance first:

  • Which markets and methods launch first, and which follow. The payment methods directory shows what is available per country.
  • Whether you need pay-in only, or payouts too, and whether payouts are single or batch.
  • Where the source of truth for an order lives, and which service owns payment state.
  • How refunds, cancellations and expired payments should appear to customers and support staff.
  • Which USDT network you want settlements on, agreed during onboarding (see USDT settlement).

Business documents and approvals run in parallel; our merchant onboarding checklist lists what to prepare.

How should you secure keys, requests and network access?

KaazPay integrations use signed requests, IP allow-listing and encrypted transport. On your side:

  1. 1Store the merchant ID and keys in a secrets manager or protected environment variables, never in a repository or client app.
  2. 2Generate signatures only on your server, exactly as the integration guide specifies.
  3. 3Send requests from fixed outbound IPs and register them for allow-listing; update the list before changing hosting.
  4. 4Limit who can read or rotate keys, and log every rotation.
  5. 5Use HTTPS for every call and for your own notification endpoint.

How do you build a reliable notification (webhook) handler?

KaazPay posts a real-time, signed notification whenever a payment or payout changes status. Treat this endpoint as critical infrastructure:

  • Verify first. Reject any notification whose signature fails, before reading its contents.
  • Cross-check. Confirm the order ID, amount and currency match what you created.
  • Be idempotent. The same notification can arrive more than once; credit or release funds only once per order.
  • Acknowledge quickly. Respond promptly and move slow work, such as emails or game-item delivery, to a queue.
  • Keep a log. Store every raw notification for support and reconciliation.

Which order and payout states must your system handle?

Exact status names come from the integration guide, but your system should be able to represent at least these situations:

SituationWhat your system should do
Created, awaiting paymentShow instructions; do not deliver yet
Pending (transfer, voucher, wallet approval)Keep open; poll status if no notification arrives within your timeout
SucceededDeliver goods or credit the balance once, after verifying the notification
Failed or cancelledShow a clear reason and offer another method
ExpiredClose the attempt; let the buyer start a new one
Payout processing / paid / failedHold funds while processing; release or correct on a final status

Bank transfers and vouchers such as Boleto can be paid long after the buyer leaves your page, so never time out an order faster than the method allows.

What should your test plan cover?

KaazPay engineers join you for testing before launch. Bring a written test matrix that includes, for every market and method you will launch:

  • A successful payment, end to end, including delivery.
  • A declined or failed payment, and the customer message shown.
  • An expired payment, and a retry with the same and with a different method.
  • The same notification delivered twice, and a notification that arrives late.
  • A request with a bad signature, and one from an IP that is not allow-listed.
  • Payouts that succeed and fail, if you use payouts.
  • How each test transaction appears in the merchant dashboard.

Which integration mistakes cause the most problems later?

  • Marking orders paid when the browser returns from the payment page.
  • Creating a new order every time a customer clicks “try again”.
  • Retrying a timed-out request without checking whether the first one succeeded.
  • Hard-coding one method per country, so adding a second method means a code release.
  • Postponing reconciliation until finance raises a question.

Several of these appear as a falling success rate; how to raise your payment success rate explains how to spot them.

What does a safe go-live look like?

  1. 1Confirm rates, fees and settlement cycles for every channel in writing.
  2. 2Launch one market, or a share of traffic, before the full rollout.
  3. 3Set alerts for failed notification processing and unusual failure rates.
  4. 4Reconcile daily: your orders against orders, balances and settlements in the KaazPay dashboard.
  5. 5Agree an incident contact with the KaazPay technical team.

Where a market has several channels, KaazPay routes each payment and fails over automatically, so you integrate once rather than per channel. See capabilities.

How do you start integrating with KaazPay?

  1. 1Open a merchant account and share your markets and business model.
  2. 2Receive your API keys and integration materials.
  3. 3Build and test with a dedicated KaazPay engineer; start with the developer overview.
  4. 4Go live with monitoring and reconciliation in place.

Contact us on Telegram via the contact page. We reply within one business day.

Frequently asked questions

It depends on your stack and how many markets and methods you launch at once. KaazPay assigns an engineer and runs joint tests to keep the path to go-live short.

Integration materials are shared once your merchant account is set up and approved.

Each notification is signed. Verify the signature, then check the order ID, amount and currency before acting on it.

Only requests from your registered server IPs are accepted, so leaked keys alone are not enough to call the API.

They use the same KaazPay merchant account, dashboard and integration partner, so you build one relationship and one set of security controls.

Add these methods to your checkout

Send your markets and volumes to our team on Telegram. We reply within one business day and prepare a channel plan with settlement cycles and pricing. One integration covers pay-in, payouts and USDT settlement.

Read next

View all