Integration
Use this endpoint to create purchases from your store and receive the final result through a webhook.
https://bs.hydracidx.com/api/purchase/Send every purchase request to this route. It is the only purchase entry point for the API.
Authorization: Token YOUR_STATIC_URL_TOKENEach field below is required in the purchase request body.
Your own unique reference for the order in your system.
409 and duplicate_reference_id.The public product identifier shown in the API Products section.
The amount of units you want to buy for the selected product.
HTTPS endpoint in your system that receives the final purchase result.
Use the dedicated test product ID below to validate your webhook integration safely.
d0d15b8b-01bb-4d88-97a2-ab6716d86404curl --request POST \
--url "https://hydracidx.com/api/purchase/" \
--header "Authorization: Token YOUR_STATIC_URL_TOKEN" \
--header "Content-Type: application/json" \
--data '{"reference_id":"WEBHOOK_TEST_001","product_id":"d0d15b8b-01bb-4d88-97a2-ab6716d86404","qty":1,"webhook_url":"https://store.example.com/api/hydracidx/webhook"}'This is the payload we will send to your server through your configured webhook URL.
{
"status": "success",
"purchase_id": 152,
"reference_id": "ORDER_100045",
"product_id": "8d4cde52-7df0-4704-852f-0ef08b4b8ed7",
"product_name": "Windows 11 Pro Retail",
"qty_requested": 3,
"qty_processed": 3,
"unit_reseller_price": "4.50",
"total_reseller_price": "13.50",
"keys": [
"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
],
"indications": "<b>Installation:</b> Follow the instructions provided for this product.",
"detail": "",
"acts_remaining": 24,
"warranty_days": 30
}pending: purchase created and still processing.success: purchase completed successfully.failed: purchase rejected or no stock was available.partial: only part of the requested quantity could be delivered.acts_remaining is only returned for online MAK or LTSC products.warranty_days is returned only if warranty applies.download_url is returned if product needs a downloadable resource.indications is an optional HTML string with additional instructions for the delivered product. The field is omitted when no additional instructions are available.