NAV
cURL NodeJS PHP Go Python

Introduce

The Mimos Commerce provides a simple and powerful REST API to integrate crypto-currency payments into your business or application. This API reference provides information on available endpoints and how to interact with them.

Base URL: https://api.mimos.io/crypto-checkout/

Guides

Accept payments via MimosPay

To accept payments via MimosPay, a token will need to be sent with the API request. And the API request will be requiring cryptographically signing before sent.

Getting API Key

You can generate a token directly from the Settings -> API Keys page.

  1. Click Add API Key
  2. Fill the form parameters
    • Label, (e.g. My MimosPay Client)
    • Success Redirect URL
    • Failure Redirect URL
    • Webhook URL, to receive the events which push by MimosPay
  3. Click Button Generate API KEY
  4. Save your API Key and API Secret either click the Copy API KEY or copy them manually

Note:

Signing request

Request Headers Example

[
  ...
  "X-MM-APP-ID": "6e1dd7ce21874898b0b77b3288f006fa",
  "X-MM-TIMESTAMP": 1594127461389,
  "X-MM-NONCE": "2hjkr7iveci"
  ...
]

Request Body Example

{
  "external_order_id":"3qqx2a6vd96x67c91cplq",
  "name":"iphone 11",
  "price":"599",
  "currency":"USD",
  "metadata":"{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}"
}
# Assume the API key is '6e1dd7ce21874898b0b77b3288f006fa'
A = 'X-MM-APP-ID=6e1dd7ce21874898b0b77b3288f006fa&external_order_id=3qqx2a6vd96x67c91cplq&name=iphone 11&price=599&currency=USD&metadata={"image_url":"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg","customer_id":"123456","customer_name":"my-user-name"}&X-MM-TIMESTAMP=1594647652397&X-MM-NONCE=2hjkr7iveci'

stringA= 'X-MM-APP-ID=6e1dd7ce21874898b0b77b3288f006fa&X-MM-NONCE=2hjkr7iveci&X-MM-TIMESTAMP=1594647652397&currency=USD&external_order_id=3qqx2a6vd96x67c91cplq&metadata={"image_url":"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg","customer_id":"123456","customer_name":"my-user-name"}&name=iphone 11&price=599'

# Assume the API Secret is '1bbbwkGuHBZhnVatOrglZyeiBzuOvYvKgNvzZCWlQHqh6m0uHWpE5h95H62BSnymJL'
stringB= stringA + '&key=1bbbwkGuHBZhnVatOrglZyeiBzuOvYvKgNvzZCWlQHqh6m0uHWpE5h95H62BSnymJL'

# MD5, '416D616F6F796778DAC3EEF2F179739D'
signatureVal = MD5(stringB).toUpperCase()

# HmacSHA256, '6BCABDD525CAE130F52D614C4F7B26727C6EDFD28777A2A76B717002E7136721'
signatureVal = HmacSHA256(stringB, secrect).toUpperCase()

Request samples

# You can also use wget
curl -X POST https://api.mimos.io/crypto-checkout/v1/charges \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-MM-APP-ID: 6e1dd7ce21874898b0b77b3288f006fa' \
  -H 'X-MM-TIMESTAMP: 1594127461389' \
  -H 'X-MM-SIGNATURE: 416D616F6F796778DAC3EEF2F179739D' \
  -H 'X-MM-NONCE: 2hjkr7iveci'
  --data-binary '{"external_order_id":"3qqx2a6vd96x67c91cplq","name":"iphone 11","price":"599","currency":"USD","metadata":"{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}"}'
const fetch = require('node-fetch');
const inputBody = {
  "metadata": "{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}",
  "price": "599",
  "name": "iphone 11",
  "external_order_id": "3qqx2a6vd96x67c91cplq",
  "currency": "USD"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-MM-APP-ID':'6e1dd7ce21874898b0b77b3288f006fa',
  'X-MM-TIMESTAMP':'1594127461389',
  'X-MM-SIGNATURE':'416D616F6F796778DAC3EEF2F179739D',
  'X-MM-NONCE':'2hjkr7iveci'
};

fetch('https://api.mimos.io/crypto-checkout/v1/charges',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'X-MM-APP-ID' => '6e1dd7ce21874898b0b77b3288f006fa',
    'X-MM-TIMESTAMP' => '1594127461389',
    'X-MM-SIGNATURE' => '416D616F6F796778DAC3EEF2F179739D',
    'X-MM-NONCE' => '2hjkr7iveci',
);

$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.mimos.io:443/crypto-checkout/v1/']);

// Define array of request body.
$request_body = array(
  "external_order_id": "3qqx2a6vd96x67c91cplq",
  "price": "599",
  "name": "iphone 11",
  "currency": "USD"
  'metadata': '{"image_url": "https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg","customer_id":"123456","customer_name":"my-user-name"}',
);

try {
    $response = $client->request('POST','charges', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }
 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "X-MM-APP-ID": []string{"6e1dd7ce21874898b0b77b3288f006fa"},
        "X-MM-TIMESTAMP": []string{"1594127461389"},
        "X-MM-SIGNATURE": []string{"416D616F6F796778DAC3EEF2F179739D"},
        "X-MM-NONCE": []string{"2hjkr7iveci"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.mimos.io/crypto-checkout/v1/charges", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-MM-APP-ID': '6e1dd7ce21874898b0b77b3288f006fa',
  'X-MM-TIMESTAMP': '1594127461389',
  'X-MM-SIGNATURE': '416D616F6F796778DAC3EEF2F179739D',
  'X-MM-NONCE': '2hjkr7iveci'
}

r = requests.post('https://api.mimos.io/crypto-checkout/v1/charges', data = payload, headers = headers)

print(r.json())

  1. Prepare the request headers and body

    • X-MM-APP-ID, your API Key
    • X-MM-TIMESTAMP, the UTC timestamp when API request, the unit is millisecond. The client timestamp included with the request must be within 5 minutes of the MimosPay system time when the request is received. If not, the request will fail with the Invalid X-MM-TIMESTAMP error
    • X-MM-NONCE, an unique string to enforce idempotence for POST requests.
    • request payload
  2. Sort the params by the non-empty key's ASCII in the ascending order and concatenate into stringA with URL key-value format(i.e. key1=value1&key2=value2…)
    Pay attention to below rules:

    • Sort the params name in the ASCII ascending order
    • The param with empty value is ignored
    • The param name are case sensitive
    • If the value is object, stringify the object to a JSON string.
  3. Append the API Secrect to stringA with param name key as stringB

  4. Use MD5 encode stringB and convert all characters to uppercasee to get the signatureVal

Making request

For more details, please refer to Create a charge

Receiving events

Webhook Example - Headers

[
  ...
  "X-MM-APP-ID": "6e1dd7ce21874898b0b77b3288f006fa"
  "X-MM-NONCE": "15aea03df5cb4f1092c6d15ad0460c59"
  "X-MM-SIGNATURE": "14D6A89E4FA1F60B00DB47B379BE3B52"
  "CONTENT-TYPE": "application/json"
  "CONTENT-LENGTH": 1354
  ...
]

Webhook Example - Body Payload

{
  "id": "tpxXfXTxY7",
  "type": "charge:complete",
  "create_at": "2020-07-09T01:23:04.632Z",
  "data": {
    "order_identifier": "3v9YNZzCpG4ltpwgdFDcTR",
    "external_order_id": "nk8yl77ffy8m74oxq0f9gi",
    "name": "iphone 11",
    "amount": "599",
    "currency": "CNY",
    "payment_method": "ethereum",
    "type": "FIXED_VALUE",
    "created_at": "1594300750683",
    "expired_at": "1594301050683",
    "state": "COMPLETE",
    "sub_state": "NONE",
    "addresses": {
      "ethereum": "0x983eB33A8Bf4D17A600dEaC6cb95E94CF1F3D8EB"
    },
    "payments": [
      {
        "network": "ethereum",
        "tx_hash": "0x8d86e3e73aba33806e830a034d1442cd286380c6ff8d989e66d8d3afaaaf35d5",
        "tx_index": "2",
        "amount": "0.352212",
        "currency": "ETH",
        "base_amount": "599",
        "state": "COMPLETE",
        "detected_at": "1594300924112",
        "confirmed_at": "1594300984154",
        "block": {
          "network_id": "5",
          "height": "3016320",
          "hash": "0xf8933c1cebef545e9a5f8e3eacdd3633fc16d68f8290b0dacf5b1bc4ee0a44be",
          "time": "1594300924112",
          "required_confirmed": "6",
          "accumulated_confirmed": "6",
          "forked": false
        }
      }
    ],
    "metadata": "{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
    "charge_url": "https://w.dev.mimos.io/crypto-checkout/3v9YNZzCpG4ltpwgdFDcTR",
    "required_info": {
      "bill_address": true,
      "customer_name": false
    },
    "bill_address": "test@mimos.io",
    "recipient_name": "test-new-api",
    "crypto_amount": "0.352212",
    "crypto_currency": "ETH"
  }
}

You can receive the event if adding a webhook subscription in Settings.

Every MimosPay webhook request includes headers,

Always make sure that you verify the webhook signature before acting on it inside your system.

The signature content,

And signing the content by follow theRules

For more details, please refer to Resource - Event.

Charges

Create a charge

To get paid in cryptocurrency, you need to create a charge object.

Code samples

# You can also use wget
curl -X POST https://api.mimos.io/crypto-checkout/v1/charges \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-MM-APP-ID: 6e1dd7ce21874898b0b77b3288f006fa' \
  -H 'X-MM-TIMESTAMP: 1594643572157' \
  -H 'X-MM-SIGNATURE: B0499D4EDF0D82A6B18C192311C0C97C' \
  -H 'X-MM-NONCE: ttmx9loxhtl'
  --data-binary '{"external_order_id":"yz7ls58srfih1zmr4dw6y","name":"iphone 11","price":"599","currency":"USD","metadata":"{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}"}'
const fetch = require('node-fetch');
const inputBody = {
  "metadata": "{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}",
  "price": "599",
  "name": "iphone 11",
  "external_order_id": "yz7ls58srfih1zmr4dw6y",
  "currency": "USD"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-MM-APP-ID':'6e1dd7ce21874898b0b77b3288f006fa',
  'X-MM-TIMESTAMP':'1594643572157',
  'X-MM-SIGNATURE':'B0499D4EDF0D82A6B18C192311C0C97C',
  'X-MM-NONCE':'ttmx9loxhtl'
};

fetch('https://api.mimos.io/crypto-checkout/v1/charges',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'X-MM-APP-ID' => '6e1dd7ce21874898b0b77b3288f006fa',
    'X-MM-TIMESTAMP' => '1594643572157',
    'X-MM-SIGNATURE' => 'B0499D4EDF0D82A6B18C192311C0C97C',
    'X-MM-NONCE' => 'ttmx9loxhtl',
);

$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.mimos.io:443/crypto-checkout/v1/']);

// Define array of request body.
$request_body = array(
  "external_order_id": "yz7ls58srfih1zmr4dw6y",
  "price": "599",
  "name": "iphone 11",
  "currency": "USD"
  'metadata': '{"image_url": "https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg","customer_id":"123456","customer_name":"my-user-name"}',
);

try {
    $response = $client->request('POST','charges', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }
 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "X-MM-APP-ID": []string{"6e1dd7ce21874898b0b77b3288f006fa"},
        "X-MM-TIMESTAMP": []string{"1594643572157"},
        "X-MM-SIGNATURE": []string{"B0499D4EDF0D82A6B18C192311C0C97C"},
        "X-MM-NONCE": []string{"ttmx9loxhtl"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.mimos.io/crypto-checkout/v1/charges", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import json
import requests
import hashlib

appId = '9b0798f2971148ba9828820612ae34bb'
appKey = 'gPGZwIu7r5bVP6B8q0HDrEtpM8VOqkTEjXkdfh4lGjYUum7h5ohYoJEfcmaxVork'
timestamp = 1595497196656

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-MM-APP-ID': appId,
  'X-MM-TIMESTAMP': "{}".format(timestamp),
  'X-MM-SIGNATURE': 'B0499D4EDF0D82A6B18C192311C0C97C',
  'X-MM-NONCE': 'ttmx9loxhtl'
}

payload = {
  "metadata": "{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}",
  "price": "599",
  "name": "iphone 11",
  "external_order_id": "order-ad-{}".format(timestamp),
  "currency": "USD"
}

total = {'X-MM-APP-ID': headers['X-MM-APP-ID'], 'X-MM-NONCE': headers['X-MM-NONCE'],
         'X-MM-TIMESTAMP': headers['X-MM-TIMESTAMP']}

# add payload TotalPrapameter
for k in list(payload.keys()):
   total[k]=payload[k]

t_keys = list(total.keys())
t_keys.sort()

stringA = ""
for k in t_keys :
  stringA+= "{}={}&".format(k, total[k])

stringA+= "key={}".format(appKey)

m = hashlib.md5()
m.update(stringA.encode("utf-8"))
h = m.hexdigest().upper()

headers['X-MM-SIGNATURE'] = h

r = requests.post('https://api.dev.mimos.io/crypto-checkout/v1/charges', data = json.dumps(payload), headers = headers)

print(r.json())

HTTP Request

POST /v1/charges

Body parameter

{
  "external_order_id":"yz7ls58srfih1zmr4dw6y",
  "name":"iphone 11",
  "price":"599",
  "currency":"USD",
  "metadata":"{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}"
}

Request Headers

Name Type Required Description
X-MM-APP-ID string true your API Key
X-MM-TIMESTAMP number true The UTC timestamp in millisecond, must be within 5 minutes
X-MM-NONCE string true An unique string, in order to prevent duplicate submission
X-MM-SIGNATURE string true The signature of request content

Request Body

Name Type Required Description
external_order_id string true The order id of the merchant's own system
name string true The product/order name
price number true Price in local fiat currency
currency string true Local fiat currency, see Supported Fiat Currencies
metadata string false The stringify of JSON value by merchant defined.
MimosPay supported fields:
  • image_url: the image will display on the customer page if the URL start with http(s) and end with jpg|gif|png|jpeg|svg
success_redirect_url string false Override the redirect URL for the successful payment
failure_redirect_url string false Override the redirect URL for the unsuccessful payment
webhook_url string false Override the webhook URL

HTTP Responses

Response Examples,

{
  "status":"201",
  "code":"0",
  "message":"created",
  "data":{
    "merchant_id":"117510825734795264",
    "order_id":"37877858784210944",
    "order_identifier":"3v9YNZzCpG41vgMGZtRLPD",
    "external_order_id":"yz7ls58srfih1zmr4dw6y",
    "name":"iphone 11",
    "amount":"599",
    "currency":"USD",
    "type":"FIXED_VALUE",
    "created_at":"1594643585263",
    "expired_at":"1594644485263",
    "state":"PRE_ORDER",
    "sub_state":"NONE",
    "charge_pricing":{
      "ethereum":{
        "amount":"2.460093",
        "currency":"ETH"
      }
    },
    "metadata":"{\"image_url\":\"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\",\"customer_id\":\"123456\",\"customer_name\":\"my-user-name\"}",
    "charge_url":"https://w.mimos.io/crypto-checkout/3v9YNZzCpG41vgMGZtRLPD",
    "required_info":{
      "bill_address":true,
      "customer_name":false
    },
    "recipient_name":"test-new-api"
  }
}
# Invalid X-MM-TIMESTAMP
{
  "status":"400",
  "code":"22000004",
  "message":"Invalid X-MM-TIMESTAMP",
  "error":{
    "module":"22",
    "module_name":"CHECKOUT_API",
    "code":"22000004",
    "message":"Invalid X-MM-TIMESTAMP",
    "key":"biz.invalid.request.timestamp"
  }
}
Status Meaning Description Schema
201 Created Created ApiResponse
400 Bad Request Bad Request ApiResponse
404 Not Found Not Found ApiResponse
500 Internal Server Error Internal Server Error ApiResponse

Update a charge

Once a charge is created and the charge order has required information then the customer must choose the payment method and fill the email address to continue order.

And Mimos will provide the user with a cryptocurrency address to which they must send cryptocurrency.

Customer must broadcast a payment to the blockchain before the charge expires.

Code samples

# You can also use wget
curl -X PUT https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
  --data-binary '{"payment_method":"ethereum","bill_address":"test@test.io"}'
const fetch = require('node-fetch');
const inputBody = {
  "bill_address":"test@test.io",
  "payment_method":"ethereum"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.mimos.io:443/crypto-checkout/v1/']);

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','{orderIdentifier}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

payload = {
  "bill_address":"test@test.io",
  "payment_method":"ethereum"
}
r = requests.put('https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}', data = payload, headers = headers)

print(r.json())

HTTP Request

PUT /v1/charges/{order_identifier}

Request Path

order_identifier: The charge order identifier

Request Parameters

Body parameter

{
  "payment_method":"ethereum",
  "bill_address":"test@test.io"
}

Request Body

Name Type Required Description
payment_method string true Payment method which is listed in Supported Crypto Currencies:
  • ethereum
  • bitcoin
  • tether
bill_address string false Customer email address to receive payment or refund notifications
customer_name string false Customer name

HTTP Responses

Response Examples,

{
  "status":"200",
  "code":"0",
  "message":"success",
  "data":{
    "merchant_id":"117510825734795264",
    "order_id":"37877858784210944",
    "order_identifier":"3v9YNZzCpG41vgMGZtRLPD",
    "external_order_id":"yz7ls58srfih1zmr4dw6y",
    "name":"iphone 11",
    "amount":"599",
    "remain_amount":"599",
    "currency":"USD",
    "payment_method":"ethereum",
    "type":"FIXED_VALUE",
    "created_at":"1594643932916",
    "expired_at":"1594644232916",
    "state":"NEW",
    "sub_state":"NONE",
    "addresses":{
      "ethereum":"0xd5f7fEE1f0E0dCecccc80a847fE57e9DEcDDad88"
    },
    "charge_pricing":{
      "ethereum":{
        "amount":"2.460692",
        "currency":"ETH"
      }
    },
    "metadata":"{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
    "charge_url":"https://w.mimos.io/crypto-checkout/3v9YNZzCpG41vgMGZtRLPD",
    "required_info":{
      "bill_address":true,
      "customer_name":false
    },
    "bill_address":"test@test.io",
    "recipient_name":"test-new-api",
    "crypto_amount":"2.460692",
    "crypto_currency":"ETH"
  }
}
Status Meaning Description Schema
200 OK OK ApiResponse
404 Not Found Not Found ApiResponse
500 Internal Server Error Internal Server Error ApiResponse

Show a charge

Retrieves the details of a charge that has been previously created. Supply the unique charge indentifier that was returned when the charge was created. This information is also returned when a charge is first created.

Code samples

# You can also use wget
curl -X GET https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier} \
  -H 'Accept: application/json'
const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'
};

fetch('https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.mimos.io:443/crypto-checkout/v1/']);

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','{orderIdentifier}', array(
        'headers' => $headers,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.mimos.io/crypto-checkout/v1/charges/{order_identifier}', headers = headers)

print(r.json())

HTTP Request

GET /v1/charges/{order_identifier}

Request Path

order_identifier: The charge order identifier

Request Parameters

Name Type Required Description
show_details boolean false Show details or not, default as true/yes

Example responses

200 Response, show_details = false

{
  "status":"200",
  "code":"0",
  "message":"success",
  "data":{
    "merchant_id":"117510825734795264",
    "order_id":"37870665871618048",
    "order_identifier":"3v9YNZzCpG41vgz5kCjwyK",
    "external_order_id":"c3yo4kmimhw0v8924ch36m9",
    "name":"iphone 11",
    "amount":"99",
    "remain_amount":"0.01",
    "currency":"CNY",
    "payment_method":"ethereum",
    "type":"FIXED_VALUE",
    "created_at":"1594641884350",
    "expired_at":"1594642184350",
    "state":"CANCEL",
    "sub_state":"UNDERPAID",
    "metadata":"{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
    "charge_url":"https://w.mimos.io/crypto-checkout/3v9YNZzCpG41vgz5kCjwyK",
    "required_info":{
      "bill_address":true,
      "customer_name":false
    },
    "bill_address":"test@aerohive.com",
    "recipient_name":"test-new-api",
    "crypto_amount":"0.057915",
    "crypto_currency":"ETH"
  }

200 Response, show_details = true

{
  "status":"200",
  "code":"0",
  "message":"success",
  "data":{
    "merchant_id":"117510825734795264",
    "order_id":"37870665871618048",
    "order_identifier":"3v9YNZzCpG41vgz5kCjwyK",
    "external_order_id":"c3yo4kmimhw0v8924ch36m9",
    "name":"iphone 11",
    "amount":"99",
    "remain_amount":"0.01",
    "currency":"CNY",
    "payment_method":"ethereum",
    "type":"FIXED_VALUE",
    "created_at":"1594641884350",
    "expired_at":"1594642184350",
    "state":"CANCEL",
    "sub_state":"UNDERPAID",
    "addresses":{
      "ethereum":"0x0A4C37559feE8EbB30d21242E370e332564d60C1"
    },
    "charge_pricing":{
      "ethereum":{
        "amount":"0.000004",
        "currency":"ETH"
      }
    },
    "payments":[
      {
        "network":"ethereum",
        "tx_hash":"0x7932bc20a7cfe2343e7d8ca08fb613d47465725f11a109a837be16070b89ffb1",
        "tx_index":"0",
        "amount":"0.057911",
        "currency":"ETH",
        "base_amount":"98.99",
        "state":"COMPLETE",
        "detected_at":"1594642153956",
        "confirmed_at":"1594642212623",
        "block":{
          "network_id":"5",
          "height":"3039067",
          "hash":"0x37d5cd540512590692a23a2be0c7a553e328aad3a1835660fe2666a5bdab8dc0",
          "time":"1594642153956",
          "required_confirmed":"6",
          "accumulated_confirmed":"6",
          "forked":false
        }
      }
    ],
    "metadata":"{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
    "charge_url":"https://w.mimos.io/crypto-checkout/3v9YNZzCpG41vgz5kCjwyK",
    "required_info":{
      "bill_address":true,
      "customer_name":false
    },
    "bill_address":"test@aerohive.com",
    "recipient_name":"test-new-api",
    "crypto_amount":"0.057915",
    "crypto_currency":"ETH",
    "refunds":[
      {
        "network":"ethereum",
        "to_address":"0x0Ad3355B3023f73a2C443Fe2C8440735d1589596",
        "amount":"0.057911",
        "currency":"ETH",
        "state":"COMPLETE",
        "detected_at":"1594642448830",
        "confirmed_at":"1594642452707",
        "tx_hash":"0xe7c24562dcefc45c11c2716d88fb1ae52d4971295454a912fb2734711b6420a4",
        "tx_index":"1",
        "block":{
          "network_id":"5",
          "height":"3039087",
          "hash":"0x400a1111fcb8f3eec6c1e222b78260b1bbce8b58df97d8257cd5c53ca41f5564",
          "time":"1594642448742",
          "required_confirmed":"6",
          "accumulated_confirmed":"6",
          "forked":false
        }
      }
    ]
  }
}

HTTP Responses

Status Meaning Description Schema
200 OK OK ApiResponse
400 Bad Request Bad Request ApiResponse
404 Not Found Not Found ApiResponse
500 Internal Server Error Internal Server Error ApiResponse

Webhooks

Webhooks make it easier to integrate with MimosPay by allowing you to subscribe to a set of charge events. You can subscribe to the events by going to your settings page and adding a new webhook subscription under your API Key.

Request Example - Headers

[
  ...
  "X-MM-APP-ID": "6e1dd7ce21874898b0b77b3288f006fa"
  "X-MM-NONCE": "15aea03df5cb4f1092c6d15ad0460c59"
  "X-MM-SIGNATURE": "14D6A89E4FA1F60B00DB47B379BE3B52"
  "CONTENT-TYPE": "application/json"
  "CONTENT-LENGTH": 1354
  ...
]

Request Example - Body Payload

{
  "id": "tpxXfXTxY7",
  "type": "charge:complete",
  "create_at": "2020-07-09T01:23:04.632Z",
  "data": {
    "order_identifier": "3v9YNZzCpG4ltpwgdFDcTR",
    "external_order_id": "nk8yl77ffy8m74oxq0f9gi",
    "name": "iphone 11",
    "amount": "599",
    "currency": "CNY",
    "payment_method": "ethereum",
    "type": "FIXED_VALUE",
    "created_at": "1594300750683",
    "expired_at": "1594301050683",
    "state": "COMPLETE",
    "sub_state": "NONE",
    "addresses": {
      "ethereum": "0x983eB33A8Bf4D17A600dEaC6cb95E94CF1F3D8EB"
    },
    "payments": [
      {
        "network": "ethereum",
        "tx_hash": "0x8d86e3e73aba33806e830a034d1442cd286380c6ff8d989e66d8d3afaaaf35d5",
        "tx_index": "2",
        "amount": "0.352212",
        "currency": "ETH",
        "base_amount": "599",
        "state": "COMPLETE",
        "detected_at": "1594300924112",
        "confirmed_at": "1594300984154",
        "block": {
          "network_id": "5",
          "height": "3016320",
          "hash": "0xf8933c1cebef545e9a5f8e3eacdd3633fc16d68f8290b0dacf5b1bc4ee0a44be",
          "time": "1594300924112",
          "required_confirmed": "6",
          "accumulated_confirmed": "6",
          "forked": false
        }
      }
    ],
    "metadata": "{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
    "charge_url": "https://w.dev.mimos.io/crypto-checkout/3v9YNZzCpG4ltpwgdFDcTR",
    "required_info": {
      "bill_address": true,
      "customer_name": false
    },
    "bill_address": "test@mimos.io",
    "recipient_name": "test-new-api",
    "crypto_amount": "0.352212",
    "crypto_currency": "ETH"
  }
}
A = 'crypto_currency=ETH&amount=599&addresses={"ethereum":"0x983eB33A8Bf4D17A600dEaC6cb95E94CF1F3D8EB"}&metadata={"image_url": "https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg", "customer_id": "123456", "customer_name": "my-user-name"}&sub_state=NONE&crypto_amount=0.352212&payments=[{"network":"ethereum","tx_hash":"0x8d86e3e73aba33806e830a034d1442cd286380c6ff8d989e66d8d3afaaaf35d5","tx_index":"2","amount":"0.352212","currency":"ETH","base_amount":"599","state":"COMPLETE","detected_at":"1594300924112","confirmed_at":"1594300984154","block":{"network_id":"5","height":"3016320","hash":"0xf8933c1cebef545e9a5f8e3eacdd3633fc16d68f8290b0dacf5b1bc4ee0a44be","time":"1594300924112","required_confirmed":"6","accumulated_confirmed":"6","forked":false}}]&created_at=1594300750683&expired_at=1594301050683&X-MM-NONCE=15aea03df5cb4f1092c6d15ad0460c59&type=FIXED_VALUE&bill_address=test@mimos.io&charge_url=https://w.dev.mimos.io/crypto-checkout/3v9YNZzCpG4ltpwgdFDcTR&order_identifier=3v9YNZzCpG4ltpwgdFDcTR&name=iphone 11&X-MM-APP-ID=6e1dd7ce21874898b0b77b3288f006fa&external_order_id=nk8yl77ffy8m74oxq0f9gi&currency=CNY&state=COMPLETE&recipient_name=test-new-api&payment_method=ethereum&required_info={"bill_address":true,"customer_name":false}'

stringA= 'X-MM-APP-ID=6e1dd7ce21874898b0b77b3288f006fa&X-MM-NONCE=15aea03df5cb4f1092c6d15ad0460c59&addresses={"ethereum":"0x983eB33A8Bf4D17A600dEaC6cb95E94CF1F3D8EB"}&amount=599&bill_address=test@mimos.io&charge_url=https://w.dev.mimos.io/crypto-checkout/3v9YNZzCpG4ltpwgdFDcTR&created_at=1594300750683&crypto_amount=0.352212&crypto_currency=ETH&currency=CNY&expired_at=1594301050683&external_order_id=nk8yl77ffy8m74oxq0f9gi&metadata={"image_url": "https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg", "customer_id": "123456", "customer_name": "my-user-name"}&name=iphone 11&order_identifier=3v9YNZzCpG4ltpwgdFDcTR&payment_method=ethereum&payments=[{"network":"ethereum","tx_hash":"0x8d86e3e73aba33806e830a034d1442cd286380c6ff8d989e66d8d3afaaaf35d5","tx_index":"2","amount":"0.352212","currency":"ETH","base_amount":"599","state":"COMPLETE","detected_at":"1594300924112","confirmed_at":"1594300984154","block":{"network_id":"5","height":"3016320","hash":"0xf8933c1cebef545e9a5f8e3eacdd3633fc16d68f8290b0dacf5b1bc4ee0a44be","time":"1594300924112","required_confirmed":"6","accumulated_confirmed":"6","forked":false}}]&recipient_name=test-new-api&required_info={"bill_address":true,"customer_name":false}&state=COMPLETE&sub_state=NONE&type=FIXED_VALUE'

# Assue the API Secret is
'2ywkGuHBZhnVatOrglZyeiBzuOvYvKgNvzZCWlQHqh6m0uHWpE5h95H62BSnymJL'
stringB= stringA + '&key=2ywkGuHBZhnVatOrglZyeiBzuOvYvKgNvzZCWlQHqh6m0uHWpE5h95H62BSnymJL'

# MD5, '14D6A89E4FA1F60B00DB47B379BE3B52'
signatureVal = MD5(stringB).toUpperCase()

# HmacSHA256, '7E758388691B06E1CCFC92F73F934CDEFB71B913434DEF3FB925B2CCDA54D622'
signatureVal = HmacSHA256(stringB, secrect).toUpperCase()

Verify the webhook request includes an X-MM-SIGNATURE header, computed using your webhook shared secret as the key,

  1. Prepare the signature content

    • X-MM-APP-ID, your API Key
    • X-MM-NONCE, an unique string to enforce idempotence for POST requests.
    • event.data in request payload
  2. Sort the params by the non-empty key's ASCII in the ascending order and concatenate into stringA with URL key-value format(i.e. key1=value1&key2=value2…)
    Pay attention to below rules:

    • Sort the params name in the ASCII ascending order
    • The param with empty value is ignored
    • The param name are case sensitive
    • If the value is object, stringify the object to a JSON string.
  3. Append the API Secrect to stringA with param name key as stringB

  4. Use MD5 encode stringB and convert all characters to uppercasee to get the signatureVal

Resources

ApiResponse

Example,

{
  "status":"200",
  "code":"0",
  "message":"success",
  "data":{
    "order_identifier":"3v9YNZzCpG41vgz5kCjwyK",
    "external_order_id":"c3yo4kmimhw0v8924ch36m9",
    "name":"iphone 11",
    "amount":"99",
    "remain_amount":"0.01",
    ...
  }
}
{
  "status":"400",
  "code":"22000004",
  "message":"Invalid X-MM-TIMESTAMP",
  "error":{
    "module":"22",
    "module_name":"CHECKOUT_API",
    "code":"22000004",
    "message":"Invalid X-MM-TIMESTAMP",
    "key":"biz.invalid.request.timestamp"
  }
}
Name Type Description
status number HTTP status code
code number
  • 0 - success
  • Not zero number - error codes
message string success or error message
data object the object defined in resources when response 2xx
error object the error object when response 4xx or 5xx

Charge

Example,

{
  "merchant_id":"117510825734795264",
  "order_id":"37870665871618048",
  "order_identifier":"3v9YNZzCpG41vgz5kCjwyK",
  "external_order_id":"c3yo4kmimhw0v8924ch36m9",
  "name":"iphone 11",
  "amount":"99",
  "remain_amount":"0.01",
  "currency":"CNY",
  "payment_method":"ethereum",
  "type":"FIXED_VALUE",
  "created_at":"1594641884350",
  "expired_at":"1594642184350",
  "state":"CANCEL",
  "sub_state":"UNDERPAID",
  "addresses":{
    "ethereum":"0x0A4C37559feE8EbB30d21242E370e332564d60C1"
  },
  "charge_pricing":{
    "ethereum":{
      "amount":"0.000004",
      "currency":"ETH"
    }
  },
  "payments":[
    {
      "network":"ethereum",
      "tx_hash":"0x7932bc20a7cfe2343e7d8ca08fb613d47465725f11a109a837be16070b89ffb1",
      "tx_index":"0",
      "amount":"0.057911",
      "currency":"ETH",
      "base_amount":"98.99",
      "state":"COMPLETE",
      "detected_at":"1594642153956",
      "confirmed_at":"1594642212623",
      "block":{
        "network_id":"5",
        "height":"3039067",
        "hash":"0x37d5cd540512590692a23a2be0c7a553e328aad3a1835660fe2666a5bdab8dc0",
        "time":"1594642153956",
        "required_confirmed":"6",
        "accumulated_confirmed":"6",
        "forked":false
      }
    }
  ],
  "metadata":"{\"image_url\": \"https://images-na.ssl-images-amazon.com/images/I/61wjAvw5B2L._AC_SX425_.jpg\", \"customer_id\": \"123456\", \"customer_name\": \"my-user-name\"}",
  "charge_url":"https://w.dev.mimos.io/crypto-checkout/3v9YNZzCpG41vgz5kCjwyK",
  "required_info":{
    "bill_address":true,
    "customer_name":false
  },
  "bill_address":"test@aerohive.com",
  "recipient_name":"test-new-api",
  "crypto_amount":"0.057915",
  "crypto_currency":"ETH",
  "refunds":[
    {
      "network":"ethereum",
      "to_address":"0x0Ad3355B3023f73a2C443Fe2C8440735d1589596",
      "amount":"0.057911",
      "currency":"ETH",
      "state":"COMPLETE",
      "detected_at":"1594642448830",
      "confirmed_at":"1594642452707",
      "tx_hash":"0xe7c24562dcefc45c11c2716d88fb1ae52d4971295454a912fb2734711b6420a4",
      "tx_index":"1",
      "block":{
        "network_id":"5",
        "height":"3039087",
        "hash":"0x400a1111fcb8f3eec6c1e222b78260b1bbce8b58df97d8257cd5c53ca41f5564",
        "time":"1594642448742",
        "required_confirmed":"6",
        "accumulated_confirmed":"6",
        "forked":false
      }
    }
  ]
}
Name Type Description
merchant_id number The id of merchant
order_id number The id of charge order
checkout_id string The id of checkout order
order_identifier string The identifier of charge order
external_order_id string The order id of the merchant's own system
name string The product/order name
amount number Price in local fiat currency
remain_amount number The remaining price in local fiat currency
payment_method string Crypto payment methods, see Supported Crypto Currencies
bill_address string The email address from customer
customer_name string The name from customer
currency string Three-letter ISO currency code, in uppercase. Must be a supported currency
created_at number The UTC timestamp in millisecond of charge order creation time
expired_at number The UTC timestamp in millisecond of charge order expiration time
state string The charge state:
  • PRE_ORDER
  • NEW
  • PENDING
  • CONFIRMING
  • COMPLETE
  • CANCEL
sub_state string The charge sub state:
  • NONE
  • EXPIRED
  • UNDERPAID
  • OVERPAID
metadata string Metadata associated with the charge
charge_url string MimosPay Hosted charge URL
success_redirect_url string Merchant Hosted payment success redirect URL
failure_redirect_url string Merchant Hosted payment failure redirect URL
crypto_amount number Price in crypto currency
crypto_currency string The crypto currency code, in uppercase. Must be a supported currency
type string The type of charge,
  • FIXED_VALUE
  • ANY_VALUE
recipient_name string The name of recipient
unresolved_id number The unresolved id associated with the charge, if there exist the unresolved payment in,
  • EXPIRED
  • UNDERPAID
  • OVERPAID
required_info Charge Rquried The charge requirement information
addresses map<string, string> Set of addresses associated with the charge, the key is payment method
» additionalProperties string The associated crypto address
charge_pricing map<string, object> Set of price information associated with the charge, the key is payment method
» additionalProperties Charge Prices The associated price in the specific payment method
payments Charge Payment[] Array of charge payment objects
refunds Charge Refund[] Array of charge refund objects

Charge Price

Example,

{
  "amount": "12.232",
  "currency": "ETH"
}

Name Type Description
amount number Price in crypto currency
currency string The crypto currency code, in uppercase. Must be a supported currency

Charge Payments

Example,

{
  "network":"ethereum",
  "tx_hash":"0x9978bc4c44a9a14151d9cfeed557ab51feb6548b2c8f101b44a67a92091f1df7",
  "tx_index":"1",
  "from_address":"0x0ad3355b3023f73a2c443fe2c8440735d1589596",
  "amount":"0.001876",
  "currency":"ETH",
  "base_amount":"3.01",
  "state":"COMPLETE",
  "detected_at":"1593761577651",
  "confirmed_at":"1593761641110",
  "block":{
    "network_id":"5",
    "height":"2980446",
    "hash":"0xdfca138018a58ef29606084d59ec3d1b48221c71b2c52ae7904617a7c3a77b0b",
    "time":"1593761577651",
    "required_confirmed":"6",
    "accumulated_confirmed":"6",
    "forked":false,
  }
}

Name Type Description
network string Crypto network, see Supported Crypto Currencies
tx_hash string The blockchain transaction hash for the charge payment
tx_index number The blockchain transaction index for the charge payment
from_address string The address of customer which sent the crypto currency
amount number The amount of crypto currency sent to the requested address
currency string Crypto currency, see Supported Crypto Currencies
base_amount number The amount in fiat currency by currency conversion
base_currency string Fiat currency, see Supported Fiat Currencies
state string The payment state:
  • PENDING
  • FORKED
  • COMPLETE
detected_at number The UTC timestamp in millisecond of payment detection time
confirmed_at number The UTC timestamp in millisecond of payment confirmation time
block Block Tx none

Charge Refund

Exmaple,

{
  "network":"ethereum",
  "to_address":"0x0Ad3355B3023f73a2C443Fe2C8440735d1589596",
  "amount":"0.005866",
  "currency":"ETH",
  "state":"PENDING",
  "state_code":"1",
  "detected_at":"1594043557364",
  "confirmed_at":"0",
  "tx_hash":"0x6930b6d590c1468c479bd30dc3bfa1c7170cbc1834c2cfd47ac57ad7aaf82cf1",
  "tx_index":"1",
  "block":{
    "network_id":"5",
    "height":"2999165",
    "hash":"0xc057e1d2fa53b8ff64c272bbd4057bd5778d8b43a4e367839caaded051ddadae",
    "time":"1594043557252",
    "required_confirmed":"6",
    "accumulated_confirmed":"1",
    "forked":false
  }
}
Name Type Description
network string Crypto network, see Supported Crypto Currencies
tx_hash string The blockchain transaction hash for the charge payment
tx_index number The blockchain transaction index for the charge payment
to_address string The address of customer which receive the crypto currency
amount number The amount of crypto currency sent to the requested address
currency string Crypto currency, see Supported Crypto Currencies
state string The payment state:
  • NEW
  • PENDING
  • COMPLETE
  • CANCEL
detected_at number The UTC timestamp in millisecond of payment detection time
confirmed_at number The UTC timestamp in millisecond of payment confirmation time
fee number none
block Block Tx none

Charge Required Informations

Example,

{
  "payment_method":"ethereum",
  "bill_address":"test@test.io",
  "customer_name": "a_customer"
}
Name Type Description
payment_method string Payment method which is listed in Supported Crypto Currencies:
  • ethereum
  • bitcoin
  • tether
bill_address string Customer email address to receive payment or refund notifications
customer_name string Customer name for email content

Block Tx Information

Example,

{
  "network_id":"5",
  "height":"2999165",
  "hash":"0xc057e1d2fa53b8ff64c272bbd4057bd5778d8b43a4e367839caaded051ddadae",
  "time":"1594043557252",
  "required_confirmed":"6",
  "accumulated_confirmed":"1",
  "forked":false
}
Name Type Description
network_id number The id of network
height number The block height associated with the blockchain transaction
hash string The block hash associated with the blockchain transaction
time number The time at the block is mined
required_confirmed number The number of requried blockchain confirmations
accumulated_confirmed number The number of accumulated blockchain confirmations, it will stop giving updates on associated order is terminated
forked boolean The blockchain has a soft fork occurs or not on this block height

Event

Example,

{
  "id": "tpxXfXTxY7",
  "type": "charge:new",
  "create_at": "2020-07-01T01:23:04.632Z",
  "data": {
    ...
  }
}

Name Type Description
id string Delivery event id
type string Delivery event type,
  • charge:new
  • charge:pending
  • charge:confirming
  • charge:complete
  • charge:cancel
create_at string The UTC timestamp, e.g., 2020-07-01T01:23:04.632Z
data object Event payload,
The resouce of the associated object (e.g. charge)

The events types,

Event Description
charge:new A charge is created
charge:pending The Charge has been first detected on blockchain but has not been confrimed yet
charge:confirming The charge has been detected and the payment amount is equal or greater than order price but has not been confrimed yet
charge:complete The charge has be confirmed to completed
charge:cancel The charge failed to complete, for:
  • Payment expired
  • Payment underpaid

Currencies

This are the currencies associated with the price field.

Fiat Currencies

The full list of currencies defined in ISO 4217 presently available in the latest-updated.

Code Currency
AED United Arab Emirates Dirham
AFN Afghan Afghani
ALL Albanian Lek
AMD Armenian Dram
ANG Netherlands Antillean Guilder
AOA Angolan Kwanza
ARS Argentine Peso
AUD Australian Dollar
AWG Aruban Florin
AZN Azerbaijani Manat
BAM Bosnia-Herzegovina Convertible Mark
BBD Barbadian Dollar
BDT Bangladeshi Taka
BGN Bulgarian Lev
BHD Bahraini Dinar
BIF Burundian Franc
BMD Bermudan Dollar
BND Brunei Dollar
BOB Bolivian Boliviano
BRL Brazilian Real
BSD Bahamian Dollar
BTC Bitcoin
BTN Bhutanese Ngultrum
BWP Botswanan Pula
BYN Belarusian Ruble
BZD Belize Dollar
CAD Canadian Dollar
CDF Congolese Franc
CHF Swiss Franc
CLF Chilean Unit of Account (UF)
CLP Chilean Peso
CNH Chinese Yuan (Offshore)
CNY RMB
COP Colombian Peso
CRC Costa Rican Colón
CUC Cuban Convertible Peso
CUP Cuban Peso
CVE Cape Verdean Escudo
CZK Czech Republic Koruna
DJF Djiboutian Franc
DKK Danish Krone
DOP Dominican Peso
DZD Algerian Dinar
EGP Egyptian Pound
ERN Eritrean Nakfa
ETB Ethiopian Birr
EUR Euro
FJD Fijian Dollar
FKP Falkland Islands Pound
GBP British Pound Sterling
GEL Georgian Lari
GGP Guernsey Pound
GHS Ghanaian Cedi
GIP Gibraltar Pound
GMD Gambian Dalasi
GNF Guinean Franc
GTQ Guatemalan Quetzal
GYD Guyanaese Dollar
HKD Hong Kong Dollar
HNL Honduran Lempira
HRK Croatian Kuna
HTG Haitian Gourde
HUF Hungarian Forint
IDR Indonesian Rupiah
ILS Israeli New Sheqel
IMP Manx pound
INR Indian Rupee
IQD Iraqi Dinar
IRR Iranian Rial
ISK Icelandic Króna
JEP Jersey Pound
JMD Jamaican Dollar
JOD Jordanian Dinar
JPY Japanese yen
KES Kenyan Shilling
KGS Kyrgystani Som
KHR Cambodian Riel
KMF Comorian Franc
KPW North Korean Won
KRW South Korean Won
KWD Kuwaiti Dinar
KYD Cayman Islands Dollar
KZT Kazakhstani Tenge
LAK Laotian Kip
LBP Lebanese Pound
LKR Sri Lankan Rupee
LRD Liberian Dollar
LSL Lesotho Loti
LYD Libyan Dinar
MAD Moroccan Dirham
MDL Moldovan Leu
MGA Malagasy Ariary
MKD Macedonian Denar
MMK Myanma Kyat
MNT Mongolian Tugrik
MOP Macanese Pataca
MRO Mauritanian Ouguiya (pre-2018)
MRU Mauritanian Ouguiya
MUR Mauritian Rupee
MVR Maldivian Rufiyaa
MWK Malawian Kwacha
MXN Mexican Peso
MYR Malaysian Ringgit
MZN Mozambican Metical
NAD Namibian Dollar
NGN Nigerian Naira
NIO Nicaraguan Córdoba
NOK Norwegian Krone
NPR Nepalese Rupee
NZD New Zealand Dollar
OMR Omani Rial
PAB Panamanian Balboa
PEN Peruvian Nuevo Sol
PGK Papua New Guinean Kina
PHP Philippine Piso
PKR Pakistani Rupee
PLN Polish Zloty
PYG Paraguayan Guarani
QAR Qatari Rial
RON Romanian Leu
RSD Serbian Dinar
RUB Russian Ruble
RWF Rwandan Franc
SAR Saudi Riyal
SBD Solomon Islands Dollar
SCR Seychellois Rupee
SDG Sudanese Pound
SEK Swedish Krona
SGD Singapore Dollar
SHP Saint Helena Pound
SLL Sierra Leonean Leone
SOS Somali Shilling
SRD Surinamese Dollar
SSP South Sudanese Pound
STD São Tomé and Príncipe Dobra (pre-2018)
STN São Tomé and Príncipe Dobra
SVC Salvadoran Colón
SYP Syrian Pound
SZL Swazi Lilangeni
THB Thai Baht
TJS Tajikistani Somoni
TMT Turkmenistani Manat
TND Tunisian Dinar
TOP Tongan Pa'anga
TRY Turkish Lira
TTD Trinidad and Tobago Dollar
TWD New Taiwan Dollar
TZS Tanzanian Shilling
UAH Ukrainian Hryvnia
UGX Ugandan Shilling
USD United States dollar
UYU Uruguayan Peso
UZS Uzbekistan Som
VEF Venezuelan Bolívar Fuerte (Old)
VES Venezuelan Bolívar Soberano
VND Vietnamese Dong
VUV Vanuatu Vatu
WST Samoan Tala
XAF CFA Franc BEAC
XAG Silver Ounce
XAU Gold Ounce
XCD East Caribbean Dollar
XDR Special Drawing Rights
XOF CFA Franc BCEAO
XPD Palladium Ounce
XPF CFP Franc
XPT Platinum Ounce
YER Yemeni Rial
ZAR South African Rand
ZMW Zambian Kwacha
ZWL Zimbabwean Dollar

Crypto Currencies

Code Currency Payment Method/Network
BTC Bitcoin bitcoin
ETH Ethereum ethereum
USDT Tether-ERC20 tether

Errors

The MimosPay API uses the following error codes:

Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The requested is hidden for administrators only.
404 Not Found -- The specified could not be found.
405 Method Not Allowed -- You tried to access a with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The requested has been removed from our servers.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
502 Bad Gateway -- We had a problem with our gateway server and got an invalid response from another upstream server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.