Home Pricing API Docs Contact
Back to API Reference

Getting Started with PureitPay

Follow this step-by-step guide to integrate payment processing into your web or mobile app in under 10 minutes.

1

Obtain Merchant API Credentials

Log in to your Merchant Portal to retrieve your unique API Key and Secret.

1. Navigate to Merchant Portal -> API Settings.

2. Copy your API Key (used in HTTP Authorization headers).

3. Store your API Secret securely (used to verify HMAC webhook signatures).

2

Create a Payment Checkout Session

Send a POST request to initialize payment and retrieve checkout URL.

// POST /api/checkout-v1
{
  "full_name": "Customer Name",
  "email": "customer@example.com",
  "amount": 1000.00,
  "invoice_id": "ORDER-101",
  "metadata": { "product_id": "45" },
  "redirect_url": "https://yourwebsite.com/checkout/success",
  "cancel_url": "https://yourwebsite.com/checkout/cancel",
  "webhook_url": "https://yourwebsite.com/api/pureitpay-webhook"
}
3

Redirect Customer & Handle Callbacks

Redirect user to payment_url returned in step 2.

Once the customer completes or cancels payment on PureitPay checkout, they will be automatically redirected back to your `redirect_url` or `cancel_url` with the `invoice_id` query parameter.

4

Receive Webhook & Verify Signature

Listen for real-time notifications on your webhook_url endpoint.

// Verify HMAC SHA256 Signature Header
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_PUREITPAY_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $payload, YOUR_API_SECRET);

if (hash_equals($expected, $signature)) {
    // Process order fulfillment securely!
}