Authenticate your wrangle.win integration.
Each merchant account can use API credentials to identify requests made to wrangle.win services.
Delivery works in the opposite direction: wrangle.win sends server-to-server POST requests to the Market URL and Callback URL configured for your merchant account.
Merchant в†’ wrangle.win
When your backend accesses a protected wrangle.win API endpoint, your API token identifies the merchant making the request.
wrangle.win в†’ Merchant
wrangle.win sends market delivery and lifecycle events directly to the HTTPS endpoints configured by your merchant account.
Merchant credentials
API tokens are associated with a specific merchant account. Treat them as confidential server-side credentials.
YOUR_WRANGLE_API_TOKEN
Use the API token issued for your merchant account. The token value and format may vary; treat the credential as an opaque secret and do not derive application logic from its format. Never publish or share a real merchant token in documentation, screenshots, frontend code or public repositories.
Never expose an API token in frontend code.
Your wrangle.win API token should only be stored and used by trusted server-side infrastructure.
- Backend environment variables
- Secret management services
- Encrypted deployment secrets
- Protected server configuration
- Browser JavaScript
- Public Git repositories
- HTML source code
- Public screenshots or support messages
Store the token outside your application code.
WRANGLE_API_TOKEN=your_merchant_api_token
Do not commit your production .env file or API credentials to source control.
Example server-side configuration
'wrangle' => [
'token' => env('WRANGLE_API_TOKEN'),
],
$token = config('services.wrangle.token');
Configure your receiving endpoints.
To receive content from wrangle.win, your merchant account needs endpoints that can receive server-to-server POST requests.
wrangle.win sends market.published events to this endpoint.
wrangle.win sends lifecycle callbacks to this endpoint: market.resolving, market.resolved and market.cancelled.
Use HTTPS endpoints in production.
Production Market and Callback URLs should use HTTPS so data is encrypted while travelling between wrangle.win and your infrastructure.
Keep production credentials private.
If your organization maintains separate development, staging and production environments, keep credentials and endpoint configuration isolated between them.
Local or internal integration testing.
Pre-production integration verification.
Live merchant infrastructure and credentials.
Replace exposed credentials immediately.
If an API token is accidentally exposed, do not continue using it as a trusted production credential.
Disable the affected token and create a replacement credential before continuing normal API operations.
Keep the integration server-to-server.
Handle delivery failures safely.
Your receiving endpoints should be prepared for network failures, non-successful responses and repeated delivery attempts.
Errors & Retries в†’