docs.api.crypto.xmoney.com Open in urlscan Pro
2a05:d014:275:cb00::c8  Public Scan

URL: https://docs.api.crypto.xmoney.com/
Submission: On May 25 via automatic, source certstream-suspicious — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

 * Introduction
 * Authentication
 * Stores API
   * Store Order
     * postCreate an order
     * getShow order details
   * Webhooks
 * Merchants API
   * Session
     * postGenerate a valid token for this session
     * delRevokes the token for the current session
   * Account
     * postCreates an account
   * Account MultiFactor
     * postRequests the activation for a user
     * delRequests the deactivation for a user
     * postConfirm the 2FA credential
     * postRequests the secret for a user
     * postRegenerate all the 2FA credentials
   * Account Password
     * patchUpdate the account password
   * Account Settings
     * getFetch the current account settings
     * patchUpdate the account settings
   * Order
     * getList orders for all the merchant's stores
     * getShow order details
   * Refund
     * getReturns a refund for the given payment, if there is one
     * postCreates a refund proposal

API docs by Redocly





XMONEY API (1.1.0)

Download OpenAPI specification:Download

E-mail: integrations@utrust.com License: Apache 2.0


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.

Check out the repo


INTRODUCTION

The xMoney API is divided into two separate use cases.

The Stores API which uses an API Key as authentication and provides endpoints to
be used by plugins or other integrations with your store. In addition to the API
Key we provide a Webhooks Secret used to sign the webhook responses to the
payments progress. That Webhook Secret is essential to ensure the payment
progress is not spoofed by a third party.

The Merchants API is comprised by all the endpoints we use to power our Merchant
dashboard. They are public so that you can integrate with your own system as you
please, but we do recommend using our dashboard as much as possible, as we'll be
sure to keep it up to date and as useful as possible.


AUTHENTICATION

Both APIs have different methods of authentication, which are explained below:


STORES_API_AUTHENTICATION

To generate the API key for the authentication of requests, head to the Merchant
Dashboard (sandbox or production) and in the Organizations tab view and generate
your keys. The generated key will have a u_live or u_test prefix in order to be
distinguished between our sandbox and production environments, respectively. You
will also see the Webhooks secret which you will need to verify the events
signature, save it for later.

For usage of the Stores API you will need to include the API key on every
request in an Authorization header with the following format Bearer <api-key>

Security Scheme Type: API Key
Header parameter name: Authorization: Bearer <api-key>


MERCHANTS_API_AUTHENTICATION

For the Merchant API we use a JSON Web Tokens (JWT) authentication. We call our
resource for generating JWT Sessions. The generated token can be used to
Authenticate your Merchant API requests using the familiar Authorization header
with Bearer <token>

Security Scheme Type: API Key
Header parameter name: Authorization: Bearer <token>


STORE ORDER


CREATE AN ORDER

Create a new order for payment processing. Returns a url to a page where a buyer
can fulfill the payment for that order.

AUTHORIZATIONS:

Stores_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON

The order information

data
object



RESPONSES

201

Order created

post/stores/orders

Production server (live)

https://merchants.api.crypto.xmoney.com/api/stores/orders

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/stores/orders


REQUEST SAMPLES

 * Payload
 * JavaScript

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "orders",
    * "attributes": {
       * "order": {
          * "reference": "order-1977",
          * "amount": {
             * "total": "1090.00",
             * "currency": "USD",
             * "details": {
                * "subtotal": "98.00",
                * "shipping": "10.00",
                * "tax": "3.00",
                * "discount": "2.00"
               
               }
            
            },
          * "return_urls": {
             * "return_url": "http://example.com/return",
             * "cancel_url": "http://example.com/cancel",
             * "callback_url": "http://example.com/callback"
            
            },
          * "line_items": [
             * {
                * "sku": "tsh-6110",
                * "name": "T-Shirt White Large",
                * "price": "100.00",
                * "currency": "USD",
                * "quantity": 5
               
               }
            
            ]
         
         },
       * "customer": {
          * "name": "John Doe",
          * "first_name": "",
          * "last_name": "",
          * "email": "john@example.com",
          * "billing_address": "118 Main St",
          * "address1": "",
          * "address2": "",
          * "city": "New York",
          * "state": "New York",
          * "post_code": "10001",
          * "postcode": "",
          * "country": "US"
         
         }
      
      }
   
   }

}



RESPONSE SAMPLES

 * 201

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "orders_redirect",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "redirect_url": "https://bill.crypto.xmoney.com/uuid"
      
      }
   
   }

}


SHOW ORDER DETAILS

AUTHORIZATIONS:

Stores_API_Authentication

PATH PARAMETERS

order_id
required
string <UUID>


QUERY PARAMETERS

include
string
Value: "payments"



RESPONSES

200

Order details

404

Order not found

get/stores/orders/{order_id}

Production server (live)

https://merchants.api.crypto.xmoney.com/api/stores/orders/{order_id}

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/stores/orders/{order_id}


RESPONSE SAMPLES

 * 200
 * 404

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "type": "orders",
    * "attributes": {
       * "status": "pending",
       * "created_at": "2018-04-26T12:48:11.954503",
       * "total_amount": {
          * "value": "40.00",
          * "currency": "USD"
         
         },
       * "customer": {
          * "name": "John Doe",
          * "first_name": "",
          * "last_name": "",
          * "email": "john@example.com",
          * "billing_address": "118 Main St",
          * "address1": "",
          * "address2": "",
          * "city": "New York",
          * "state": "New York",
          * "post_code": "10001",
          * "postcode": "",
          * "country": "US"
         
         },
       * "merchant_uuid": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
       * "items": [
          * {
             * "sku": "tsh-6110",
             * "name": "T-Shirt White Large",
             * "price": "100.00",
             * "currency": "USD",
             * "quantity": 5
            
            }
         
         ]
      
      }
   
   }

}



WEBHOOKS

To sync with the progress of Order payment we use webhooks. To ensure that the
webhooks are comming from xMoney and not some unauthorized third party we create
a signature for EVERY request the signature is included in the webhook payload
and can be reconstructed for verification. You can use our libraries for this or
you code it yourself manually.


EVENTS

Events are our way of letting you know when something interesting happens with
an order. For example, when a payment for an order is confirmed, we create a
ORDER.PAYMENT.RECEIVED event.

We communicate these events via a webhooks system, which are sent to the URL you
provide us as the callback_url for the order.

List of events:

 * ORDER.PAYMENT.DETECTED - Triggered when the payment is detected on the
   blockchain, it doesn't happen always, the payment can go straight to the
   confirmation. Bear in mind also that this event is not a payment
   confirmation, it still needs to be processed by xMoney
 * ORDER.PAYMENT.RECEIVED - Triggered when the payment is confirmed
 * ORDER.PAYMENT.CANCELLED - Triggered when the payment is cancelled

VERIFYING EVENTS

Since these events are sent from us to you, you might want to verify that they
were not tampered with in the process. To allow for that, we sign every event
with HMAC SHA256, using the webhook secret as the signing key.

We sort the payload for each event, so that we can guarantee it will always be
the same. To do this on your side you should first remove the signature field,
and then recursively order each field alphabetically by its name. For example:

payload = {
  "event_type":"ORDER.PAYMENT.RECEIVED",
  "resource":{
    "reference":"1400012634",
    "amount":"10.8200",
    "currency":"EUR"
  },
  "signature":"5ef8a5994e917c14479b31f690d4d2a023dfcc6059081504e3087977b21580ab",
  "state":"completed"
}

ordered_payload = {
  "event_type":"ORDER.PAYMENT.RECEIVED",
  "resource":{
    "amount":"10.8200",
    "currency":"EUR",
    "reference":"1400012634"
  },
  "state":"completed"
}


Once it's ordered, you should join it into a string, sign it and then base16
encode it:

joined_payload =
“event_typeORDER.PAYMENT.RECEIVEDresourceamount10.8200resourcecurrencyEURresourcereference1400012634statecompleted"
signed_payload = :crypto.hmac(:sha256, secret, joined_payload)
signature = Base.encode16(signed_payload, case: :lower) # This step might not be needed (e.g. on PHP and Ruby, the hmac function already returns a base16 value)


You can see an example of the signature validation function in PHP here.

RESPONSE AND RETRIES

We will be expecting your response to our webhook to be:

 * If everything went well → status: 200 OK; with no body or a valid JSON (e.g.
   { success: true });
 * If signature or body request is invalid → status: 400 Bad Request;
 * If something else went wrong → status: 500 Internal Server Error;

If our HTTP request to your system fails, we will retry 15 times with an
exponential back off. It follows the Fibonacci sequence pattern, therefore, the
last event will be 987 minutes after the first one (that's 16h27). After
ORDER.PAYMENT.RECEIVED notification fail 15 times, we will send an email with
the error messages.


SESSION


GENERATE A VALID TOKEN FOR THIS SESSION

Use your xMoney credentials to generate a JWT that you will need to perform any
authenticated request on the Merchants API.

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Token generated

401

Invalid credentials

post/session

Production server (live)

https://merchants.api.crypto.xmoney.com/api/session

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/session


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "session",
    * "attributes": {
       * "email": "john@example.com",
       * "password": "string"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200
 * 401

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "session",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "token":
         "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJtZXJjaGFudF9jbGllbnQiLCJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE1NzcxMDA2MTMsImlhdCI6MTU3NDY4MTQxMywiaXNzIjoibWVyY2hhbnRfY2xpZW50IiwianRpIjoiYTFkNmRkYWEtZjFlYi00NjBkLWFiMmEtMzM4Y2NhNzcyZjBkIiwibmJmIjoxNTc0NjgxNDEyLCJyb2xlIjoib3duZXIiLCJzdWIiOiJVc2VyOmE1NzEyNzNhLThmOTEtNDIwOC04MTBkLTcwOGZjYzEyZmJmNSIsInR5cCI6ImFjY2VzcyJ9.QjPZNPlasZfCON-o-mVKQpHOVafVe7T-GLAeDBgaRJYM_DYroYDU3g-G0_WZ0Rj8x_a4YY_lXTjLsfVEkPv5kg",
       * "tfa_missing": true
      
      }
   
   }

}



REVOKES THE TOKEN FOR THE CURRENT SESSION

AUTHORIZATIONS:

Merchants_API_Authentication


RESPONSES

200

Token revoked

delete/session

Production server (live)

https://merchants.api.crypto.xmoney.com/api/session

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/session


ACCOUNT


CREATES AN ACCOUNT

Provide details in order to create a merchant account

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON

Credentials you choose to be used on your account

data
object



RESPONSES

200

Account created

400

Invalid credentials

post/sign_up

Production server (live)

https://merchants.api.crypto.xmoney.com/api/sign_up

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/sign_up


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "account",
    * "attributes": {
       * "email": "user@example.com",
       * "password": "string",
       * "organization_name": "string",
       * "first_name": "string",
       * "last_name": "string"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200
 * 400

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "type": "merchants",
    * "attributes": { }
   
   }

}



ACCOUNT MULTIFACTOR

The multifactor activation has two steps:

 1. Generating and retrieving a secret with this endpoint.
 2. Using the authenticator code (generated with the secret) activate it with
    this endpoint.


REQUESTS THE ACTIVATION FOR A USER

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Multi factor activated

post/multi_factor_auth/tfa_activation

Production server (live)

https://merchants.api.crypto.xmoney.com/api/multi_factor_auth/tfa_activation

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/multi_factor_auth/tfa_activation


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_activation",
    * "attributes": {
       * "code": "123456"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_activation",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc"
   
   }

}


REQUESTS THE DEACTIVATION FOR A USER

AUTHORIZATIONS:

Merchants_API_Authentication

PATH PARAMETERS

user_id
required
string <UUID>


REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Multi factor activated

delete/multi_factor_auth/tfa_activation/{user_id}

Production server (live)

https://merchants.api.crypto.xmoney.com/api/multi_factor_auth/tfa_activation/{user_id}

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/multi_factor_auth/tfa_activation/{user_id}


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_activation",
    * "attributes": {
       * "code": "123456"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_activation",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc"
   
   }

}


CONFIRM THE 2FA CREDENTIAL

When the user has 2FA enabled, it should call this endpoint with the current JWT
session token. Then, the token in this response should replace the previous one
in the next requests.

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Token generated

post/multi_factor_auth/tfa_confirmation

Production server (live)

https://merchants.api.crypto.xmoney.com/api/multi_factor_auth/tfa_confirmation

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/multi_factor_auth/tfa_confirmation


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_confirmation",
    * "attributes": {
       * "code": "123456"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "session",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "token":
         "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJtZXJjaGFudF9jbGllbnQiLCJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE1NzcxMDA2MTMsImlhdCI6MTU3NDY4MTQxMywiaXNzIjoibWVyY2hhbnRfY2xpZW50IiwianRpIjoiYTFkNmRkYWEtZjFlYi00NjBkLWFiMmEtMzM4Y2NhNzcyZjBkIiwibmJmIjoxNTc0NjgxNDEyLCJyb2xlIjoib3duZXIiLCJzdWIiOiJVc2VyOmE1NzEyNzNhLThmOTEtNDIwOC04MTBkLTcwOGZjYzEyZmJmNSIsInR5cCI6ImFjY2VzcyJ9.QjPZNPlasZfCON-o-mVKQpHOVafVe7T-GLAeDBgaRJYM_DYroYDU3g-G0_WZ0Rj8x_a4YY_lXTjLsfVEkPv5kg"
      
      }
   
   }

}


REQUESTS THE SECRET FOR A USER

Requests the generation of a Time-based One Time Password (secret) for the user,
including a URI to be included in a QR code

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Secret generated

post/multi_factor_auth/tfa_secret

Production server (live)

https://merchants.api.crypto.xmoney.com/api/multi_factor_auth/tfa_secret

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/multi_factor_auth/tfa_secret


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_secret"
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_secret",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "secret": "407c1e588e224ce48ff4caf2e2525742",
       * "key_uri":
         "otpauth%3A%2F%2Ftotp%2FUTRUST%3Abraeden1983%40lueilwitz.org%3Fissuer%3DUTRUST%26secret%3DGQYDOYZRMU2TQODFGIZDIY3FGQ4GMZRUMNQWMMTFGI2TENJXGQZA",
       * "recovery_code": "c2f7a15dc34c4c1f8818094741c6aa78"
      
      }
   
   }

}


REGENERATE ALL THE 2FA CREDENTIALS

To be used when the user can't generate a 2FA code. Will disable 2FA and request
re-activation.

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON



data
object



RESPONSES

200

Secret generated

post/multi_factor_auth/tfa_secret/{user_id}

Production server (live)

https://merchants.api.crypto.xmoney.com/api/multi_factor_auth/tfa_secret/{user_id}

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/multi_factor_auth/tfa_secret/{user_id}


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_secret",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "recovery_code": "c2f7a15dc34c4c1f8818094741c6aa78"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "tfa_secret",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "secret": "407c1e588e224ce48ff4caf2e2525742",
       * "key_uri":
         "otpauth%3A%2F%2Ftotp%2FUTRUST%3Abraeden1983%40lueilwitz.org%3Fissuer%3DUTRUST%26secret%3DGQYDOYZRMU2TQODFGIZDIY3FGQ4GMZRUMNQWMMTFGI2TENJXGQZA",
       * "recovery_code": "c2f7a15dc34c4c1f8818094741c6aa78"
      
      }
   
   }

}


ACCOUNT PASSWORD


UPDATE THE ACCOUNT PASSWORD

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON

The password to be updated

data
object



RESPONSES

200

Password updated

patch/settings/password

Production server (live)

https://merchants.api.crypto.xmoney.com/api/settings/password

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/settings/password


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "password",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "password": "string",
       * "new_password": "string",
       * "tfa_token": "123456"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "password",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "message": "Password successfully changed."
      
      }
   
   }

}


ACCOUNT SETTINGS


FETCH THE CURRENT ACCOUNT SETTINGS

AUTHORIZATIONS:

Merchants_API_Authentication


RESPONSES

200

Account settings

get/settings/account

Production server (live)

https://merchants.api.crypto.xmoney.com/api/settings/account

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/settings/account


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "orders_redirect",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "email": "john@example.com",
       * "first_name": "John",
       * "last_name": "Doe",
       * "tfa_active": true
      
      }
   
   }

}


UPDATE THE ACCOUNT SETTINGS

AUTHORIZATIONS:

Merchants_API_AuthenticationStores_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON

The settings to be updated

data
object



RESPONSES

200

Account settings

patch/settings/account

Production server (live)

https://merchants.api.crypto.xmoney.com/api/settings/account

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/settings/account


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "account_settings",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "first_name": "string",
       * "last_name": "string"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "orders_redirect",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "email": "john@example.com",
       * "first_name": "John",
       * "last_name": "Doe",
       * "tfa_active": true
      
      }
   
   }

}


ORDER


LIST ORDERS FOR ALL THE MERCHANT'S STORES

AUTHORIZATIONS:

Merchants_API_Authentication

QUERY PARAMETERS

cursor
string

Specifies where to start fetching data from

limit
integer [ 1 .. 100 ]
Default: 100

The maximum number of results to return per call

include
string
Value: "payment"



RESPONSES

200

List of orders for merchant

get/orders

Production server (live)

https://merchants.api.crypto.xmoney.com/api/orders

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/orders


RESPONSE SAMPLES

 * 200

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": [
    * {
       * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
       * "type": "orders",
       * "attributes": {
          * "status": "pending",
          * "created_at": "2018-04-26T12:48:11.954503",
          * "total_amount": {
             * "value": "40.00",
             * "currency": "USD"
            
            },
          * "customer": {
             * "name": "John Doe",
             * "first_name": "",
             * "last_name": "",
             * "email": "john@example.com",
             * "billing_address": "118 Main St",
             * "address1": "",
             * "address2": "",
             * "city": "New York",
             * "state": "New York",
             * "post_code": "10001",
             * "postcode": "",
             * "country": "US"
            
            },
          * "merchant_uuid": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
          * "items": [
             * {
                * "sku": "tsh-6110",
                * "name": "T-Shirt White Large",
                * "price": "100.00",
                * "currency": "USD",
                * "quantity": 5
               
               }
            
            ]
         
         }
      
      }
   
   ]

}


SHOW ORDER DETAILS

AUTHORIZATIONS:

Merchants_API_Authentication

PATH PARAMETERS

order_id
required
string <UUID>


QUERY PARAMETERS

include
string
Value: "payments"



RESPONSES

200

Order details

404

Order not found

get/orders/{order_id}

Production server (live)

https://merchants.api.crypto.xmoney.com/api/orders/{order_id}

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/orders/{order_id}


RESPONSE SAMPLES

 * 200
 * 404

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "type": "orders",
    * "attributes": {
       * "status": "pending",
       * "created_at": "2018-04-26T12:48:11.954503",
       * "total_amount": {
          * "value": "40.00",
          * "currency": "USD"
         
         },
       * "customer": {
          * "name": "John Doe",
          * "first_name": "",
          * "last_name": "",
          * "email": "john@example.com",
          * "billing_address": "118 Main St",
          * "address1": "",
          * "address2": "",
          * "city": "New York",
          * "state": "New York",
          * "post_code": "10001",
          * "postcode": "",
          * "country": "US"
         
         },
       * "merchant_uuid": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
       * "items": [
          * {
             * "sku": "tsh-6110",
             * "name": "T-Shirt White Large",
             * "price": "100.00",
             * "currency": "USD",
             * "quantity": 5
            
            }
         
         ]
      
      }
   
   }

}



REFUND


RETURNS A REFUND FOR THE GIVEN PAYMENT, IF THERE IS ONE

AUTHORIZATIONS:

Merchants_API_Authentication

PATH PARAMETERS

payment_id
required
string <UUID>



RESPONSES

200

Refund details

404

Refund not found

get/payments/{payment_id}/refund

Production server (live)

https://merchants.api.crypto.xmoney.com/api/payments/{payment_id}/refund

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/payments/{payment_id}/refund


RESPONSE SAMPLES

 * 200
 * 404

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "type": "refunds",
    * "attributes": {
       * "requested_amount": "string",
       * "requested_currency": "string",
       * "status": "proposed",
       * "reason": "string"
      
      }
   
   }

}



CREATES A REFUND PROPOSAL

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 active proposal at any given time, if you create a proposal and there was
already one, the new one will take it's place.

AUTHORIZATIONS:

Merchants_API_Authentication

REQUEST BODY SCHEMA: APPLICATION/VND.API+JSON

Refund proposal to send to the buyer

data
object



RESPONSES

200

Refund details

404

Refund not found

post/payments/{payment_id}/refund

Production server (live)

https://merchants.api.crypto.xmoney.com/api/payments/{payment_id}/refund

Sandbox server (test)

https://merchants.api.sandbox.crypto.xmoney.com/api/payments/{payment_id}/refund


REQUEST SAMPLES

 * Payload

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
 * "data": {
    * "type": "refunds",
    * "id": "c8d65cc2-0c82-429a-95ea-3f65011fc2cc",
    * "attributes": {
       * "amount": "10.90",
       * "currency": "USD",
       * "reason": "Shirt size did not fit"
      
      }
   
   }

}


RESPONSE SAMPLES

 * 200
 * 404

Content type
application/vnd.api+json
Copy
[
 * null

]