Skip to main content

Quickstart

This guide walks you through integrating Open Pay into your application. By the end, you will be able to create checkout sessions and handle payment webhooks.
You need a verified merchant account to get API keys. The verification process typically takes under 24 hours.
1

Create a Merchant Account

Sign up at the Merchant Portal with your email and password. You will receive a confirmation email to verify your address.
2

Complete KYC Verification

After signing in, navigate to Settings > KYC Verification and submit the required documents:
  • Business registration certificate
  • National ID or passport of the business owner
  • Bank account details for fiat settlement (LKR)
The admin team will review and approve your application. You will receive an email once your account is verified.
You cannot generate API keys or process payments until KYC verification is complete.
3

Get Your API Keys

Once verified, go to the Integrations page in the Merchant Portal:
Click Generate API Key to create a new key pair. You will receive:
The API Secret is shown only once. Copy it immediately and store it in a secure location such as an environment variable or secrets manager.
4

Install the SDK

Install the Open Pay SDK for your language of choice.
Initialize the client with your credentials:
The SDK handles HMAC-SHA256 request signing automatically. You do not need to compute signatures manually.
5

Create a Checkout Session

A checkout session generates a hosted payment page where your customer can pay with crypto.
The response includes:
6

Handle the Webhook Callback

When a payment is confirmed on-chain, Open Pay sends a webhook to your configured endpoint. Webhooks are signed with ED25519 for authenticity.First, configure your webhook URL in the Merchant Portal under Integrations > Webhooks, or via the API:
Then, set up a handler to verify and process incoming webhooks:
Always return a 200 status within 10 seconds. If your endpoint fails or times out, Open Pay retries with exponential backoff (up to 5 attempts over 24 hours).

Next Steps

Authentication

Understand JWT, HMAC, and ED25519 auth mechanisms in depth

Payment Flow

Full lifecycle of a payment from creation to settlement

Webhooks Guide

Advanced webhook configuration, retry policies, and event types

API Reference

Explore all 80+ API endpoints with examples