Integration Documentation
Welcome to the official integration documentation for the SportyWallet Worker service.
This guide is intended for external partners who need to read card identifiers and write credits to cards through the Worker running on a host machine.
Integration Scope
The only integration entry point is the local HTTP API exposed by the Worker service.
Available operations:
- Check service availability with
GET /ping - Read the current card with
GET /readcard - Get the customer's credits from the cloud with
GET /info - Write credits to the current card with
POST /writecard - Discharge (reset) the current card with
POST /dischargecard
Base URL:
http://localhost:60000
Authentication
Partners receive an API key from the SportyWallet integration team upon request.
Header to use:
X-Api-Key: <your-api-key>
Authentication is required for GET /readcard, GET /info, POST /writecard, and POST /dischargecard.
Getting Started
Before making API calls, ensure the following:
- The Worker service is running on the host machine. You can verify this by calling
GET /ping. - Your integration origin is allowlisted when browser-based access is required.
- You have received a valid
X-Api-Keyfrom the SportyWallet integration team. - You are targeting
http://localhost:60000.
Quick Test Flow
- Call
GET /pingto confirm that the Worker is reachable. - Call
GET /infowith theX-Api-Keyheader to retrieve the customer's current credits from the cloud. - Place a card on the reader and call
GET /readcardwith theX-Api-Keyheader to read the card's stored credits. - Send a recharge request to
POST /writecardwith theX-Api-Keyheader and a JSON body containing eithercreditsoramount. - To reset a card, place it on the reader and call
POST /dischargecardwith theX-Api-Keyheader.
Example request (recharge by number of credits):
POST /writecard HTTP/1.1
Host: localhost:60000
X-Api-Key: your-api-key
Content-Type: application/json
{
"credits": 10
}
Example request (recharge by € amount):
POST /writecard HTTP/1.1
Host: localhost:60000
X-Api-Key: your-api-key
Content-Type: application/json
{
"amount": 1.5//€ value
}
Testing Tools
You can use the provided Postman assets to test the integration quickly:
Worker download by environments:
Support
For API key provisioning, allowlisting requests, or integration support, contact the SportyWallet integration team.