Brolexy API Docs
API Environment
Brolexy API is available in two separate environments: Production and Development.
Please make sure you are using the correct base URL depending on the environment you want to access.
- Production API: https://api.brolexy.com
- Development API: https://api-dev.brolexy.com
Use the Production API for real orders and live operations. Use the Development API for testing, integration checks, and sandbox requests.
Endpoint paths are added to the base URL, for example https://api.brolexy.com/accounts. The previous addresses https://app.brolexy.com/api (Production) and https://dev.brolexy.com/api (Development) keep working and return the same responses, so existing integrations do not need to change.
Important
Request time
The time header must be the current Unix time at the moment you send the request, in seconds (milliseconds are also accepted). Generate a new time and a new signature for every request and never resend an old pair. Keep your server clock synchronized (NTP).
Requests whose time differs from the current time by more than 5 minutes, and requests that repeat an already used signature, are recorded now and may be rejected in the future.
Unique referenceID
Send a new referenceID with every order, for example your own order number, and keep it: with it you can fetch the order later using get-order.
If an order request timed out or you did not receive a response, first call get-order with the same referenceID before sending the order again. A repeated order request with the same referenceID currently creates a second order and charges your account again; get-order returns the first order with that referenceID. Repeated referenceID values may be rejected in the future.
[GET]Request accounts and their balancesURL /accounts Headers
Header Value Description publicKey{publicKey} Public key time{time} Current Unix time (see Request time) signaturebase64(HmacSHA256({time})) Signature of
messageNote: HmacSHA256 must return a string value first, and then this string should be encoded with Base64. Do not Base64-encode the raw binary HMAC output directly.
✅ Response 200
[ { "id": 1, "balance": "450.36", "currency": "EUR", "status": "ACTIVE" }, { "id": 3, "balance": "0.00", "currency": "GBP", "status": "BLOCKED" } ]
✅ Response 403
{ "code": 403, "text": "{error_text}", "message": {"error_description"} }
[GET]Request available productsURL /products Headers
Header Value Description publicKey{publicKey} Public key time{time} Current Unix time (see Request time) signaturebase64(HmacSHA256({time})) Signature of
message✅ Response 200
[ { "productId": 7, "category": "PSN", "region": "FI", "name": "PSN 5 EUR Finland", "price": "5.11", "priceCurrency": "EUR", "inStock": 6 }, { "productId": 8, "category": "PSN", "region": "FI", "name": "PSN 10 EUR Finland", "price": "10.02", "priceCurrency": "EUR", "inStock": 2 } ]
✅ Response 403
{ "code": 403, "text": "{error_text}", "message": {"error_description"} }
[GET]Get single product by IdURL /product?productId={productId} Headers
Header Value Description publicKey{publicKey} Public key time{time} Current Unix time (see Request time) signaturebase64(HmacSHA256({time}.{productId})) Signature of
message✅ Response 200
[ { "productId": 7, "category": "PSN", "region": "FI", "name": "PSN 5 EUR Finland", "price": "5.11", "priceCurrency": "EUR", "inStock": 6 } ]
✅ Response 403
{ "code": 403, "text": "{error_text}", "message": {"error_description"} }
[POST]Submit orderURL /order Headers
Header Value Description publicKey{publicKey} Public key time{time} Current Unix time (see Request time) signaturebase64(HmacSHA256({time}.{productID}.{quantity})) Signature of
messageContent-Typeapplication/json Content-Type Note: The dots and brackets in base64(HmacSHA256({time}.{productID}.{quantity})) are shown only as notation for concatenation and placeholders. Do not include dots or brackets in the actual message string. Example: if time = 1710000000, productID = 12345, and quantity = 2, the message to sign should be 1710000000123452.Body
{ "accountID": 1, "productID": 7, "quantity": 2 }Body (optional)
You can optionally provide a unique client order identifier to facilitate future inquiries about a specific order. This field should be a string containing only permitted characters: uppercase and lowercase letters (A-Z, a-z), digits (0-9), hyphen (-) and underscore (_). Maximum length is 64 characters. Use a new referenceID for every order (see Unique referenceID above).
{ "accountID": 1, "productID": 7, "quantity": 2, "referenceID": "{referenceID}" }✅ Response 200
{ "status": "SUCCESS", "orderID": "api_66c6005f6b62b485703184", "product": "PSN 5 EUR Finland", "pins": [ { "pin": "testcode2" }, { "pin": "testcode1" } ] }
✅ Response 403
{ "code": 403, "text": "{error_text}", "message": {"error_description"} }
[GET]Request order informationURL /get-order?referenceID={referenceID} Headers
Header Value Description publicKey{publicKey} Public key time{time} Current Unix time (see Request time) signaturebase64(HmacSHA256({time}.{referenceID})) Signature of
message✅ Response 200
{ "status": "SUCCESS", "orderID": "api_66c6005f6b62b485703184", "product": "PSN 5 EUR Finland", "pins": [ { "pin": "testcode2" }, { "pin": "testcode1" } ] }
✅ Response 403
{ "code": 403, "text": "{error_text}", "message": {"error_description"} }