# xMoney Crypto API

The xMoney Crypto API allows merchants to integrate cryptocurrency payments into their platforms. It follows RESTful principles and uses JSON:API specifications. 

Key features:

* Resource-oriented URLs
* JSON responses
* Standard HTTP response codes and verbs

API keys are used for authentication to ensure secure communication. Webhooks are supported for real-time payment notifications.


Version: 1.1.0
License: Apache 2.0

## Servers

Production server (live)
```
https://merchants.api.crypto.xmoney.com/api
```

Sandbox server (test)
```
https://merchants.api.sandbox.crypto.xmoney.com/api
```

## Security

### ApiKey

Authenticate requests using your API key. 

**Key format:**

* Production keys: `u_live_XXXXXXXXXXXXXXXXXXXXXXXX`
* Sandbox keys: `u_test_XXXXXXXXXXXXXXXXXXXXXXXX`

Include the API key in the `Authorization` header of every request as `Bearer <api-key>`.

**Example:** `Authorization: Bearer u_live_XXXXXXXXXXXXXXXXXXXXXXXX`


Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

[xMoney Crypto API](https://docs.xmoney.com/_bundle/crypto_api/reference.yaml)

## Order

Operations related to managing orders.

### Create an order

 - [POST /stores/orders](https://docs.xmoney.com/crypto_api/reference/order/create-an-order.md): Creates a new order for payment processing and returns a URL where the buyer can complete the payment.

### List all orders of the merchant

 - [GET /stores/orders](https://docs.xmoney.com/crypto_api/reference/order/listorders.md)

### Retrieve an order

 - [GET /stores/orders/{id}](https://docs.xmoney.com/crypto_api/reference/order/retrieve-an-order.md): Retrieve the details of an existing order using its unique identifier.

## Refund

### Creates a refund proposal

 - [POST /stores/refunds/{payment_id}](https://docs.xmoney.com/crypto_api/reference/refund/createpaymentrefundproposal.md): As a merchant you can only propose refunds, it's ultimately the buyer's decision to either accept or reject it (within a reasonable timeframe). There can only be one refund proposed per payment.For payments older than 3 months, refund is not allowed.

### Returns a refund for the given payment, if there is one

 - [GET /stores/refunds/{payment_id}](https://docs.xmoney.com/crypto_api/reference/refund/getpaymentrefund.md)

