Skip to main content
Developers

Developer-First Payments

Build custom payment experiences with predictable APIs, typed SDKs, signed webhooks and a full sandbox.

RESTful by design

Resource-oriented endpoints, JSON everywhere and standard HTTP codes.

Idempotent requests

Safely retry any request with idempotency keys — no duplicate charges.

Versioned & stable

Dated API versions so upgrades happen on your schedule.

Test mode everywhere

Every feature works in the sandbox with test keys and test cards.

API Explorer

Explore the API

Browse common endpoints and see example requests and responses.

Endpoints

Request
curl https://api.rpad.com/v1/payments \
  -u rb_test_key: \
  -H "Idempotency-Key: 6f1c-demo" \
  -d amount=4999 \
  -d currency=SAR \
  -d method=card \
  -d customer=customer_1024
Response200
{
  "id": "pay_demo_48291",
  "object": "payment",
  "amount": 4999,
  "currency": "SAR",
  "method": "card",
  "status": "success",
  "created_at": "2026-09-28T10:24:00Z"
}

Static example — no request is sent.

Code Snippets

A few lines to your first payment

Examples in popular languages. All snippets are illustrative.

Node.js
import RPAD from "@rpad/node";

const rpad = new RPAD(process.env.RPAD_SECRET_KEY);

const payment = await rpad.payments.create({
  amount: 4999,
  currency: "SAR",
  method: "mada",
  customer: "customer_1024",
});

console.log(payment.id); // pay_demo_48291
SDKs

Official SDKs

Idiomatic libraries for the languages your team already uses.

v3.2.0

JavaScript

Browser checkout and client-side tokenisation.

Installnpm i @rpad/checkout
v2.8.1

Python

Server-side payments for Django, Flask and FastAPI.

Installpip install rpad
v4.1.0

Java

Type-safe client for JVM services.

Installcom.rpad:rpad-java:4.1.0
v2.5.3

PHP

Drop-in support for PHP applications and CMS platforms.

Installcomposer require rpad/rpad-php
v5.0.2

Node.js

Async server SDK with full TypeScript types.

Installnpm i @rpad/node
Webhooks

Real-time events, delivered reliably

Subscribe to payment lifecycle events. Every delivery is signed so you can verify it came from RPAD.

  • payment.capturedA payment was successfully captured.
  • payment.failedA payment attempt failed.
  • refund.processedA refund was processed.
  • payout.completedA payout was completed.
  • Verify signatures using your webhook secret.
  • Automatic retries with exponential backoff.
webhook · payment.captured
POST /webhooks/rpad
Rpad-Signature: t=1790000000,v1=5f2b…demo

{
  "event": "payment.captured",
  "data": {
    "id": "pay_demo_48291",
    "amount": 4999,
    "currency": "SAR"
  }
}

Test scenarios

Sandbox
  • Successful payment4111 1111 1111 1111
  • Declined payment4000 0000 0000 0002
  • Held for reviewreview@rpad-test
Sandbox

A sandbox that behaves like production

Test every flow — success, failure, refund and webhook — without moving real money.

  • Separate test API keys
  • Test mada and credit cards for every scenario
  • Simulated webhooks and settlements
  • Reset data at any time