Integration guide

API documentation

Explore the building blocks for connecting your checkout and keeping payment status in sync.

Connect your payments

Use a server-side integration to create payment requests and check their status. Keep private credentials on your server and return only the information your customer needs.

Keep secret keys private. Never include them in browser code or public pages.

Authentication

Send your account credentials in secure request headers from your server. Create and manage credentials in your PayPremium account.

X-API-Key: YOUR_PUBLIC_KEY
X-API-Secret: YOUR_SECRET_KEY

Create an order

Provide an amount, a unique order reference, and a short description. The response contains a checkout link for your customer.

POST /api/create-order
Content-Type: application/json
{
"amount": "1250.00",
"order_id": "ORDER-20481",
"description": "Studio booking"
}

Check payment status

Confirm the latest order status from your server before fulfilling a purchase. Treat pending payments as incomplete until confirmation arrives.

POST /api/check-status
Content-Type: application/json
{
"order_id": "ORDER-20481"
}

Webhook events

Receive asynchronous payment updates at an endpoint you control. Validate each event signature before processing the event.

Create an account