Developers
Built for developers.
Create payments, manage refunds, receive transaction updates and build payment operations directly into your product.
POST/api/v1/payments
curl "$RAINBOWPAY_API_BASE/api/v1/payments" \
-X POST \
-H "Authorization: Bearer YOUR_PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"product": "Order RP-10428",
"amount": 125000,
"currency": "HKD",
"orderNumber": "RP-10428",
"callbackUrl": "https://merchant.example/payments/callback",
"redirectSuccessUrl": "https://merchant.example/checkout/success",
"redirectFailUrl": "https://merchant.example/checkout/failed",
"locale": "en"
}'Everything you need to integrate
API overviewResources, authentication, conventions and errors.SandboxBuild and test without moving real money.WebhooksReceive status changes on your server.
Keys stay on your server
Every call is authenticated with a private key sent as a bearer token over HTTPS. Never embed it in a browser or mobile app.
Separate environments
Sandbox and production use different credentials. Production access follows compliance, commercial and technical approval.
Full reference
Parameters, response formats, error codes and payment states are documented at docs.rainbowpay.hk.
Lifecycle
From request to callback.
Merchant server
Creates the payment with your private key.
POST /api/v1/paymentsRainbow Pay API
Validates the request and returns a payment token.
200 · tokenPayment processing
The customer pays; authentication runs where required.
Result
The payment reaches a final status.
approved | declinedCallback
Status is posted to your callback URL.
POST callbackUrl
Integration guides
Hosted Checkout integrationRedirect the customer to a Rainbow Pay-hosted payment page and receive the result on your server. Card details are entered on the hosted page, not on your site.Server-to-server API paymentsCreate and manage payments directly from your server through the Rainbow Pay API, including two-step payments and refunds.Handling callbacksReceive payment status changes on your server and process them safely, even when notifications are repeated, delayed or out of order.Recurring paymentsTake a first payment with the customer present, then charge later repeat payments using a recurring token.
Ready to discuss your payment setup?
Tell us how your business accepts payments today and what you need from your next payment integration.