# Introduction **The xMoney API** is organized around REST, particularly using the JSON:API spec. Our API has resource-oriented URLs, returns JSON responses and uses standard HTTP response codes and verbs. ## Key features * **Manage the entire payment lifecycle:** * Create and manage orders * Issue refunds * Get webhook notifications * **Seamless integration:** * Standard HTTPS connections with TLS 1.2 or higher * API key authentication * Easy integration with your existing systems ## Request format The xMoney API expects requests to be submitted with a `Content-Type` of `application/x-www-form-urlencoded`. This means that data should be encoded in the URL-encoded format, where key-value pairs are separated by ampersands (`&`) and keys and values are encoded using percent-encoding (e.g., spaces are replaced by `%20`). ### Example request ```bash curl -X GET \ https://merchants.api.crypto.xmoney.com/api/stores/orders/{orderId} \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ## Response format The API will return responses in JSON (JavaScript Object Notation) format. Responses will typically include a status code indicating the success or failure of the request, along with any relevant data. ### Example response ```json { "data": { "attributes": { "created_at": "2025-04-04T09:00:31Z", "customer": { "address1": "118 Main St", "address2": null, "billing_address": "118 Main St", "buyer_country": null, "city": "New York", "country": "US", "email": "your-email@xmoney.com", "first_name": "", "ip_country": null, "last_name": "", "name": "Jane Doe", "old_email": "your-email@xmoney.com", "post_code": "10001", "postcode": "10001", "state": "New York" }, "dispute_id": null, "items": [], "merchant_uuid": "e34d46a8-d112-4f1a-b758-985c4e252696", "payment_uuid": null, "pricing_details": { "discount": null, "shipping": null, "subtotal": null, "tax": null }, "reference": "TEST-by-xmoney-using-insomnia-NQWRG24", "reference_amount": null, "refundable": false, "settlement_amount": null, "status": "pending", "total_amount": { "currency": "USD", "value": "90.00" } }, "id": "217105c0-303c-40f5-88d6-1c2051f2ab57", "links": { "self": "https://merchants.api.dev.crypto.xmoney.com/api/orders/217105c0-303c-40f5-88d6-1c2051f2ab57" }, "relationships": {}, "type": "orders" }, "included": [], "links": { "first": "https://merchants.api.dev.crypto.xmoney.com/api/orders/217105c0-303c-40f5-88d6-1c2051f2ab57?page%5Bpage%5D=1", "last": "https://merchants.api.dev.crypto.xmoney.com/api/orders/217105c0-303c-40f5-88d6-1c2051f2ab57?page%5Bpage%5D=1", "next": "https://merchants.api.dev.crypto.xmoney.com/api/orders/217105c0-303c-40f5-88d6-1c2051f2ab57?page%5Bpage%5D=1&page%5Bsize%5D=0", "prev": null, "self": "https://merchants.api.dev.crypto.xmoney.com/api/orders/217105c0-303c-40f5-88d6-1c2051f2ab57" } } ```