API Reference
Authentication
Send your API Secret in the X-Scanpay-Key header, from your server, over HTTPS. Never put it in browser or mobile app code. Your credentials are in the Business Portal.
The X-Scanpay-Key header #
Send your API Secret in the X-Scanpay-Key header with every request:
curl
bash
curl https://api.scanandpay.com.au/createPaymentSession \
-X POST \
-H "X-Scanpay-Key: $SCANANDPAY_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"platformOrderId": "order_456",
"amountCents": 1990
}'Where to find your credentials #
Your credentials are in the Business Portal:
- 1Sign in to the Business Portal.
- 2Open Settings → Integrations.
- 3Copy your Merchant ID, API Secret, and Webhook Secret into your server's environment variables.
.env
bash
SCANANDPAY_MERCHANT_ID=your_merchant_id
SCANANDPAY_API_SECRET=your_api_secret
SCANANDPAY_WEBHOOK_SECRET=your_webhook_secret
SCANANDPAY_API_BASE_URL=https://api.scanandpay.com.auReplacing credentials #
Replacing credentials stops connected integrations until you update them.