1. Get Your API Key
- Log in to dashboard.shoppex.io
- Go to Settings → API Keys
- Click Generate New Key
- Copy the key (starts with
shx_)
API keys are shown only once. Store it securely before closing the dialog.
2. Make Your First Request
Let’s fetch your shop information to verify everything works:
curl https://api.shoppex.io/dev/v1/me \
-H "Authorization: Bearer shx_your_api_key"
Response:
{
"data": {
"id": 12345,
"name": "My Awesome Shop",
"currency": "USD",
"created_at": 1704067200
}
}
3. Create a Payment
Now let’s create a payment link:
curl -X POST https://api.shoppex.io/dev/v1/payments \
-H "Authorization: Bearer shx_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Order #123",
"email": "[email protected]",
"value": 29.99,
"currency": "USD"
}'
Response:
{
"data": {
"uniqid": "abc123def456...",
"url": "https://shoppex.io/invoice/abc123def456...",
"url_branded": "https://shoppex.io/invoice/abc123def456...?shop=12345",
"total": 29.99,
"currency": "USD",
"status": "PENDING",
"created_at": 1704067200
}
}
Redirect your customer to the url to complete payment.
4. Handle the Result
After payment, Shoppex sends a webhook to your server:
{
"event": "order:paid",
"data": {
"invoice_id": "inv_def456",
"customer_email": "[email protected]",
"total": 29.99,
"currency": "USD"
}
}
Webhooks Guide
Learn how to set up and verify webhooks
Next Steps