Bearer API key
Use `Authorization: Bearer <apiKey>` for `POST /payments/initialize` and the related custom REST routes.
Foxpay custom REST integrations authenticate with Bearer API keys. Send `Authorization: Bearer <apiKey>` from your backend and keep merchant credentials out of any browser context.
Use `Authorization: Bearer <apiKey>` for `POST /payments/initialize` and the related custom REST routes.
Each key is tied to one merchant store and one environment (test or live). Use the credential issued for the request's intended environment.
Inbound webhooks use signed requests. Verify `X-Foxpay-Signature` separately from outbound API authentication.
Forward the API key on every request to the custom integration endpoints. The canonical custom flow is server-to-server, so the key never reaches the buyer's browser.
# Initialization request
curl -X POST "https://app.foxpay.it/api/payments/initialize" \
-H "Authorization: Bearer fp_live_example" \
-H "Content-Type: application/json" \
-d '{
"merchantId": "merchant_fxp_ABC12345",
"orderId": "order_1001",
"amountCents": 12345,
"currency": "EUR"
}'
# Polling request
curl -H "Authorization: Bearer fp_live_example" \
"https://app.foxpay.it/api/payments/tx_123/status"fp_live_… # production-mode merchant API key
fp_test_… # test-mode merchant API key
fp_legacy_… # pre-Bearer compatibility token (still accepted)The prefix is part of the issued credential and is logged on usage. Use it to route traffic to the correct environment in your own configuration system.
Custom integration keys are managed from the merchant store's Integration tab in the Foxpay app. Treat the issued secret as one-time visible material.