Create a payment order and receive a hosted checkout URL.
Send form fields or JSON over HTTPS. No Bearer token — identify the merchant with merchant (your merchant_ref).
https://okepay.biz/api
Endpoint: POST /create_transaction
No Bearer token is required. Pass your merchant reference in the body as merchant
(the same value shown as merchant_ref in your merchant dashboard).
Content-Type: application/x-www-form-urlencoded # or application/json
Accept: application/json
merchant=1zLSD3
POST /api/create_transaction
— creates an order and returns a hosted checkout_url.
Send the buyer to that URL to complete payment. Treat the IPN callback as the source of truth for payment status.
| Field | Required | Description |
|---|---|---|
| merchant | yes | Your merchant_ref |
| amountf | yes | Amount in currency1 (e.g. 10.00) |
| currency1 | yes | ISO currency code (e.g. EUR, USD) |
| buyer_email | yes | Buyer email |
| item_name | yes | Item name shown on checkout / IPN |
| item_number | yes | Item / SKU reference |
| invoice | yes | Your order / invoice reference |
| ipn_url | yes | Server-to-server notification URL |
| buyer_first_name | no | Buyer first name |
| buyer_last_name | no | Buyer last name |
| buyer_mobile | no | Buyer mobile (e.g. +85290000000) |
| success_url | no | Browser return URL after successful payment |
| cancel_url | no | Browser return URL if payment is cancelled |
| send_email_paylink | no | 0 or 1 — email the checkout link to the buyer |
| email_subject | no | Subject when emailing the pay link |
| PaymentType | no | Payment type filter; use 0 for default / all enabled methods |
| user_creation | no | Auto-create buyer account when needed |
| address_supplied | no | true / false — when true, send address fields |
| address_line1 | if address | Required when address_supplied=true |
| address_city | if address | Required when address_supplied=true |
| address_country | no | ISO 3166-1 alpha-2 (e.g. HK). Defaults to HK |
| address_line2 | no | Address line 2 |
| address_state_province | no | State / province |
| address_postal_code | no | Postal code |
| locale | no | Checkout locale (e.g. en) |
POST https://okepay.biz/api/create_transaction
Content-Type: application/x-www-form-urlencoded
Accept: application/json
merchant=1zLSD3
&amountf=10.00
¤cy1=EUR
&buyer_email=buyer@example.com
&buyer_first_name=John
&buyer_last_name=Doe
&buyer_mobile=+4407700000000
&item_name=Test Product
&item_number=SKU-001
&invoice=ORDER-100234
&ipn_url=https://your-shop.example/okepay/ipn
&success_url=https://your-shop.example/checkout?status=success
&cancel_url=https://your-shop.example/checkout?status=cancel
&send_email_paylink=0
&PaymentType=0
&locale=en
POST https://okepay.biz/api/create_transaction
Content-Type: application/json
Accept: application/json
{
"merchant": "1zLSD3",
"amountf": "10.00",
"currency1": "EUR",
"buyer_email": "buyer@example.com",
"buyer_first_name": "John",
"buyer_last_name": "Doe",
"buyer_mobile": "+4407700000000",
"item_name": "Test Product",
"item_number": "SKU-001",
"invoice": "ORDER-100234",
"ipn_url": "https://your-shop.example/okepay/ipn",
"success_url": "https://your-shop.example/checkout?status=success",
"cancel_url": "https://your-shop.example/checkout?status=cancel",
"send_email_paylink": "0",
"PaymentType": "0",
"locale": "en"
}
{
"status": true,
"message": "",
"response": {
"payment_id": "READLXPY...",
"original_amount": "10.00",
"original_currency": "EUR",
"checkout_url": "https://okepay.biz/apimakePayment/...",
"confirms_needed": 1,
"timeout": 18000,
"paymentLink": "https://okepay.biz/apimakePayment/...",
"amountf": "10.00"
}
}
Open response.checkout_url in the browser so the buyer can pay on the hosted checkout page.
When the payment status changes, okePay POSTs a notification to your ipn_url.
Always use the IPN (not the browser return) to mark the order paid.
POST https://your-shop.example/okepay/ipn
# Payload fields include invoice, payment_id, status, amounts, and currency.
# Respond with HTTP 200 so delivery is acknowledged.
| status | Meaning |
|---|---|
| true | Order created — use response.checkout_url |
| false | Validation or merchant error — see message |