NAV Navbar
shell
  • Introduction
  • Wallets
  • Wallet addresses
  • Wallet's address transactions
  • Wallet's transactions
  • Wallet's webhooks
  • Wallet's Webhooks for Outgoing Transactions
  • Exchange Callbacks
  • Wallet's payment forwarding
  • Wallet's seed
  • Errors
  • Signing API requests
  • Address validation
  • Invoice processing
  • Introduction

    Common

    This is a documentation for public https://cryptoprocessing.io service. Before using this API you need to get API keys of the related page in your personal account.

    Idempotent Requests

    curl "https://cryptoprocessing.io/api/v1/ping" \
      -H "Authorization: Token <token>" \
      -H "Idempotency-Key: 60Nk1zqhQJDoFnKj"
    

    The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create a charge fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single charge is created.

    GET and DELETE requests are idempotent by definition, meaning that the same backend work will occur no matter how many times the same request is issued. You shouldn't send an idempotency key with these verbs because it will have no effect.

    To perform an idempotent request, provide an additional Idempotency-Key: header to the request.

    How you create unique keys is up to you, but we suggest using V4 UUIDs or another appropriately random string. We'll always send back the same response for requests made with the same key, and keys can't be reused with different request parameters. Keys expire after 24 hours.

    Request IDs

    Each API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution.

    Pagination

    All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list transactions, wallets. These list API methods share a common structure, taking at least these two parameters: page and limit.

    Argument Description
    page Pagination starts at page 1, not at page 0 (page 0 will return the same results as page 1)
    limit A limit on the number if objects to be returned. (default 25, max 100)

    Dates

    All dates should be passed and will be formatted according with iso8601 - YYYY-MM-DDTHH:mm:ss.sssZ (ex. 2018-04-10T14:48:00.000Z)

    Wallets

    Wallet object

    Example

    {
        "id": "a0f1f57d-322e-4a90-9f60-ca17387fa2c5",
        "name": "main",
        "currency": "BTC",
        "human": "Main BTC Wallet",
        "description": "Default BTC wallet with multiple addresses",
        "system_fee_percent": "0.0",
        "merchant_fee_percent": "0.0",
        "balance": "1.948",
        "created_at": "2018-08-14T16:44:26.925Z",
        "updated_at": "2018-08-21T12:22:37.391Z"
    }
    

    Represents wallet object

    Attributes:

    Attribute Description
    id Wallet ID
    name Wallet name
    currency Wallet's currency. Available options: ["BTC", "ETH", "EUR", "RUB", "USD", "USDT"]
    human Wallet full name
    description Wallet description
    system_fee_percent Processing fee percent
    merchant_fee_percent Merchant fee percent
    balance Wallet balance (by default this field is present only for requesting a specific wallet, you need to add an extra parameter when you request an array of wallets so that the balance is displayed)
    created_at Wallet creation date and time
    updated_at Wallet updated date and time

    Create wallet

    POST https://cryptoprocessing.io/api/v1/wallets

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -H 'Idempotency-Key: 7952c055-b8a1-498e-b0ea-737985e954c0' \
      -d '{
        "name": "crypto_btc",
        "currency": "BTC",
        "human": "Crypto BTC",
        "description": "For inner use of the new crypto-exchange"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "8961afc0-e2da-4807-a517-e82909c135ee",
            "name": "crypto_btc",
            "currency": "BTC",
            "human": "Crypto BTC",
            "description": "For inner use of the new crypto-exchange",
            "system_fee_percent": "1.0",
            "merchant_fee_percent": "0.0",
            "created_at": "2018-08-29T10:51:39.283Z",
            "updated_at": "2018-08-29T10:51:39.881Z"
        }
    }
    

    Create wallet from parent wallet

    You can create a wallet for Ethereum Token based on your Ethereum wallet. Or, based on a Ethereum Token wallet, create an Ethereum wallet.

    POST https://cryptoprocessing.io/api/v1/wallets

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "name": "Ethereum Token wallet from Ethereum wallet",
        "currency": "ABX",
        "human": "Human name",
        "description": "Some description",
        "parent_wallet": "44efc654-b40f-44e0-8e70-b3fcffbf5b98"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "2d7964ab-f59e-4e4d-8f2b-aa6371132c82",
            "name": "Ethereum Token wallet from Ethereum wallet",
            "currency": "ABX",
            "human": "Human name",
            "description": "Some description",
            "system_fee_percent": "1.0",
            "merchant_fee_percent": "0.0",
            "created_at": "2018-11-21T09:51:57.153Z",
            "updated_at": "2018-11-21T09:51:57.153Z"
        }
    }
    

    Create wallet by seed phrase

    GET https://cryptoprocessing.io/api/v1/wallets/:wallet_id/seed

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/seed \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -H 'Idempotency-Key: <token>' \
      -d '{
        "seed": "task olympic spoon remove answer method divert wet stick stuff cause trick",
        "name": "Wallet name",
        "currency": "BTC",
        "segwit_type": "native",
        "human": "Human name",
        "description": "Some description"
    }'
    

    Example response

    {
        "data": {
            "id": "8961afc0-e2da-4807-a517-e82909c135ee",
            "name": "Wallet name",
            "currency": "BTC",
            "human": "Human name",
            "description": "Some description",
            "system_fee_percent": "1.0",
            "merchant_fee_percent": "0.0",
            "created_at": "2018-08-29T10:51:39.283Z",
            "updated_at": "2018-08-29T10:51:39.881Z"
        }
    }
    

    Return wallet

    POST https://cryptoprocessing.io/api/v1/wallet/:id

    Example request

    curl -X GET \
      https://cryptoprocessing.io/api/v1/wallets/f17dc388-c93d-4934-87ca-b830151cb837 \
      -H 'Authorization: Token <token>' \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "f17dc388-c93d-4934-87ca-b830151cb837",
            "name": "main",
            "currency": "ETH",
            "human": "Main ETH Wallet",
            "description": "Default ETH wallet with multiple addresses",
            "system_fee_percent": "1.0",
            "merchant_fee_percent": "0.0",
            "balance": "0.5459715561",
            "created_at": "2018-09-03T07:02:15.860Z",
            "updated_at": "2018-09-03T07:02:16.195Z"
        }
    }
    

    Wallets without balances

    GET https://cryptoprocessing.io/api/v1/wallets?page=1&limit=20

    Example request

    curl -X GET \
      'https://cryptoprocessing.io/api/v1/wallets?page=1&limit=20' \
      -H 'Authorization: Token <token>' \
      -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 5,
            "current_page": 1,
            "last_page": 1,
            "limit": 20,
            "out_of_range": false
        },
        "data": [
            {
                "id": "a0f1f57d-322e-4a90-9f60-ca17387fa2c5",
                "name": "main",
                "currency": "BTC",
                "human": "Main BTC Wallet",
                "description": "Default BTC wallet with multiple addresses",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "created_at": "2018-08-14T16:44:26.925Z",
                "updated_at": "2018-08-21T12:22:37.391Z"
            },
            {
                "id": "c6136ee4-eabd-4cbe-aed8-ecd0ffdbcc4e",
                "name": "main",
                "currency": "ETH",
                "human": "Main ETH Wallet",
                "description": "Default ETH wallet with multiple addresses",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "created_at": "2018-08-14T16:44:27.478Z",
                "updated_at": "2018-08-21T12:22:38.231Z"
            },
            {
                "id": "3a488bed-1f03-4f89-9c04-0713d240c45f",
                "name": "main",
                "currency": "EUR",
                "human": "Main EUR Wallet",
                "description": "Default EUR wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "created_at": "2018-08-14T16:44:27.946Z",
                "updated_at": "2018-08-21T15:42:08.601Z"
            },
            {
                "id": "5b191e4b-e1c2-4e9c-8d0b-4c4ab87a4129",
                "name": "main",
                "currency": "RUB",
                "human": "Main RUB Wallet",
                "description": "Default RUB wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "created_at": "2018-08-14T16:44:27.950Z",
                "updated_at": "2018-08-21T12:22:35.378Z"
            },
            {
                "id": "50540b3f-3ebe-4397-8d96-80f78ad08e2d",
                "name": "main",
                "currency": "USD",
                "human": "Main USD Wallet",
                "description": "Default USD wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "created_at": "2018-08-14T16:44:27.954Z",
                "updated_at": "2018-08-21T12:22:35.866Z"
            }
        ]
    }
    

    Wallets with balances

    This request takes longer to execute than the request without balances

    GET https://cryptoprocessing.io/api/v1/wallets?page=1&limit=20&extra[]=balance

    Example request

    curl -X GET \
      'https://cryptoprocessing.io/api/v1/wallets?page=1&limit=20&extra[]=balance' \
      -H 'Authorization: Token <token>' \
      -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 5,
            "current_page": 1,
            "last_page": 1,
            "limit": 20,
            "out_of_range": false
        },
        "data": [
            {
                "id": "a0f1f57d-322e-4a90-9f60-ca17387fa2c5",
                "name": "main",
                "currency": "BTC",
                "human": "Main BTC Wallet",
                "description": "Default BTC wallet with multiple addresses",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "balance": "0.0",
                "created_at": "2018-08-14T16:44:26.925Z",
                "updated_at": "2018-08-21T12:22:37.391Z"
            },
            {
                "id": "c6136ee4-eabd-4cbe-aed8-ecd0ffdbcc4e",
                "name": "main",
                "currency": "ETH",
                "human": "Main ETH Wallet",
                "description": "Default ETH wallet with multiple addresses",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "balance": "0.0",
                "created_at": "2018-08-14T16:44:27.478Z",
                "updated_at": "2018-08-21T12:22:38.231Z"
            },
            {
                "id": "3a488bed-1f03-4f89-9c04-0713d240c45f",
                "name": "main",
                "currency": "EUR",
                "human": "Main EUR Wallet",
                "description": "Default EUR wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "balance": "0.0",
                "created_at": "2018-08-14T16:44:27.946Z",
                "updated_at": "2018-08-21T15:42:08.601Z"
            },
            {
                "id": "5b191e4b-e1c2-4e9c-8d0b-4c4ab87a4129",
                "name": "main",
                "currency": "RUB",
                "human": "Main RUB Wallet",
                "description": "Default RUB wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "balance": "0.0",
                "created_at": "2018-08-14T16:44:27.950Z",
                "updated_at": "2018-08-21T12:22:35.378Z"
            },
            {
                "id": "50540b3f-3ebe-4397-8d96-80f78ad08e2d",
                "name": "main",
                "currency": "USD",
                "human": "Main USD Wallet",
                "description": "Default USD wallet",
                "system_fee_percent": "0.0",
                "merchant_fee_percent": "0.0",
                "balance": "0.0",
                "created_at": "2018-08-14T16:44:27.954Z",
                "updated_at": "2018-08-21T12:22:35.866Z"
            }
        ]
    }
    

    Wallet addresses

    Wallet address object

    Example

    {
        "address": "0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336",
        "final_balance": "2.189445976325668992",
        "total_received": "2.289446",
        "total_sent": "0.100000023674331008",
        "txs_count": 15
    }
    

    Represents wallet object

    Attributes:

    Attribute Description
    id Address ID
    name Some human name
    address Address
    final_balance Current address balance
    total_received Incoming transactions amount
    total_sent Outgoing transactions amount
    txs_count Transactions count

    Return wallet addresses

    GET https://cryptoprocessing.io/api/v1/wallets/:id/addresses?page=1&limit=25

    Example request

    curl -X GET \
      'https://cryptoprocessing.io/api/v1/wallets/c6136ee4-eabd-4cbe-aed8-ecd0ffdbcc4e/addresses?page=1&limit=25' \
      -H 'Authorization: Token <token>' \
      -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 3,
            "current_page": 1,
            "last_page": 1,
            "limit": 25,
            "out_of_range": false
        },
        "data": [
            {
                "address": "0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336",
                "final_balance": "2.189445976325668992",
                "total_received": "2.289446",
                "total_sent": "0.100000023674331008",
                "txs_count": 15
            },
            {
                "address": "0x2a9f57585de532f675660f3ec3f73f41195fa8bb",
                "final_balance": "0.0",
                "total_received": "0.0",
                "total_sent": "0.0",
                "txs_count": 0
            }
        ]
    }
    

    Return wallet address

    GET https://cryptoprocessing.io/api/v1/wallets/:id/addresses/:address

    Example request

    curl -X GET \
      'https://cryptoprocessing.io/api/v1/wallets/c6136ee4-eabd-4cbe-aed8-ecd0ffdbcc4e/addresses/0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336' \
      -H 'Authorization: Token <token>' \
      -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    {
        "data": {
            "address": "0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336",
            "final_balance": "2.189445976325668992",
            "total_received": "2.289446",
            "total_sent": "0.100000023674331008",
            "txs_count": 15
        }
    }
    

    Create address

    POST https://cryptoprocessing.io/api/v1/wallets/:id/addresses

    Parameters:

    Parameter Description
    name Some human name

    Returns an address object

    Wallet's address transactions

    The ETH or TOKEN transaction object

    Parameter Description
    hash Transaction hash
    block_number Block number where the transaction is included
    confirmations_count Transaction confirmation count
    description Transaction description
    gas_price Gas price
    gas_limit Gas limit
    nonce Ethereum transaction nonce
    type Transaction type
    value Transaction amount
    sender_address A ethereum address of the sender
    receiver_address A ethereum address of the recipient
    statuses Array of transaction statuses
    forwarded_for Hash of the transaction for which the forwarding was made

    All possible transaction statuses:

    Possible statuses for outgoing transactions:
    "non confirmed", "queued", "in mempool", "in block", "failed", "pending", "success"

    Possible statuses for incoming transactions:
    "in mempool", "in block", "failed", "pending", "success"

    The BTC transaction object

    Parameter Description
    hash Transaction hash
    amount Transaction amount
    block_number Block number where the transaction is included
    confirmations_count Transaction confirmation count
    fee Transaction fee
    type Transaction type
    description Transaction description
    receiver_addresses Array of receiver addresses with amount
    sender_address Array of sender addresses with amount
    statuses Array of transaction statuses
    forwarded_for Hash of the transaction for which the forwarding was made

    All possible transaction statuses:

    Possible statuses for outgoing transactions:
    "non confirmed", "queued", "in mempool", "in block", "failed"

    Possible statuses for incoming transactions:
    "in mempool", "in block", "failed"

    Get All transactions

    Parameter Description
    wallet_id Wallet ID
    address Address
    from_date From date
    to_date Before date
    page Pagination starts at page 1, not at page 0 (page 0 will return the same results as page 1)
    limit A limit on the number if objects to be returned. (default 25, max 100)
    from_address Sender address
    to_address Receiver address

    GET https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address_id/transactions

    curl "https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address_id/transactions?
    &from_date=2016-04-12T00:00:00.000Z&to_date=2019-04-30T00:00:00.01100Z&page=1&limit=10&fromaddress&toaddress
      -H "Authorization: Token <token>"
    

    For the Ethereum the above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 1,
            "current_page": 1,
            "last_page": 1,
            "limit": 10,
            "out_of_range": false
        },
        "data": [
            {
                "hash": "0xa59ae3c19ab383143918cfe032271e2182855a5a3449f068f533379e4ea46fab",
                "block_number": 4267539,
                "confirmations_count": 302,
                "description": "Incoming transaction",
                "gas_price": "0.000000111",
                "gas_limit": 21000,
                "nonce": 94,
                "type": "receive",
                "value": "2.0",
                "sender_address": "0x8abAb4093391340180CACe15404866499bb7D701",
                "receiver_address": "0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336",
                "forwarded_for": "0x11a37d55786b781b01dda4405646c43bcc36574b45b9f83470ebd19fba7470c3",
                "statuses": [
                    {
                        "status": "in mempool",
                        "date": "Fri, 19 Oct 2018 10:06:58 GMT"
                    },
                    {
                        "status": "in block",
                        "date": "Fri, 19 Oct 2018 10:07:06 GMT"
                    }
                ]
            }
        ]
    }
    

    For the Bitcoin the above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 1,
            "current_page": 1,
            "last_page": 1,
            "limit": 10,
            "out_of_range": false
        },
        "data": [
            {
                "hash": "ea574e5982434a920b6d3be80090fb8da97f6f4d20c7eb522c9c36772a81fad9",
                "amount": "0.00013",
                "block_number": 1439531,
                "confirmations_count": 11,
                "fee": "0.00001",
                "type": "send",
                "description": "Transaction [CURL]",
                "forwarded_for": "3b10b68f8703efae9c71134feeca6770670e1e2aae78faba9868da0d341fa157",
                "receiver_addresses": [
                    {
                        "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB",
                        "amount": "0.0001"
                    },
                    {
                        "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB",
                        "amount": "0.00003"
                    },
                    {
                        "address": "2N8QznL4ifxkg5nUakQL4aAwNTCREWrDdgv",
                        "amount": "0.01453181"
                    }
                ],
                "sender_addresses": [
                    {
                        "address": "2N8QznL4ifxkg5nUakQL4aAwNTCREWrDdgv"
                    }
                ],
                "statuses": [
                    {
                        "status": "non confirmed",
                        "date": "Fri, 19 Oct 2018 10:11:24 GMT"
                    },
                    {
                        "status": "in mempool",
                        "date": "Fri, 19 Oct 2018 10:11:24 GMT"
                    },
                    {
                        "status": "in block",
                        "date": "Fri, 19 Oct 2018 10:36:37 GMT"
                    }
                ]
            }
        ]
    }
    

    Create BTC transaction

    Parameter Description
    to_ Recipient addresses with amount
    description Transaction description
    fee "fastestFee", "halfHourFee", "hourFee" or value in bitcoin

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/45346ce2-b905-49f9-8463-cb0959c93784/addresses/2N8QznL4ifxkg5nUakQL4aAwNTCREWrDdgv/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "to_": [
            {
                "amount": "0.0001",
                "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
            },
            {
                "amount": "0.00003",
                "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
            }
        ],
        "description": "Transaction [CURL]",
        "fee": "hourFee"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "2d4217e45c1e3ff6a1257a95662eebce30bb6ac195e874fb3fbcd337dff5f464"
        }
    }
    

    Create ETH transaction

    Parameter Description
    to_ Recipient address
    description Transaction description
    gas_price GasPrice in ether
    gas_limit GasLimit
    amount Amount in ether

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/568c5ed2-10c5-4a80-b91d-5a80f8e1f7e0/addresses/0x05cb0eab06fbb7ab1aa5708bab3bce35b6bff336/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "to_": "0x8abAb4093391340180CACe15404866499bb7D701",
        "description": "Transaction [CURL]",        
        "gas_price": "0.00000000001",
        "gas_limit": 21000,
        "amount": "0.0000000505"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "0x1cc19b3a7f80d12b992c5bed3f101548b374d2c9c4804fde4d02508c36e4fcbc"
        }
    }
    

    Create TOKEN transaction

    Parameter Description
    to_ Recipient address
    description Transaction description
    gas_price GasPrice in ether
    gas_limit GasLimit
    amount Amount in tokens
    use_liquidity_wallet_for_fee Payment of commission with liquidity wallet (true/false)

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/ae8e53dd-c42e-43b1-9b6f-eecb2c4aa934/addresses/0xf019ea768e154219935ff957f2216c66d9eb802a/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "to_": "0x8abAb4093391340180CACe15404866499bb7D701",
        "description": "Transaction [CURL]",
        "gas_price": "0.0000000001",
        "gas_limit": 150000,
        "amount": "100.005",
        "use_liquidity_wallet_for_fee": false
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "0x1cc19b3a7f80d12b992c5bed3f101548b374d2c9c4804fde4d02508c36e4fcbc"
        }
    }
    

    Create USDT transaction

    Parameter Description
    to_ Recipient addresses
    amount Amount
    description Transaction description

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/addresses/:address/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/73b819fb-0332-24ec-8ac9-49a247c3299a/addresses/2N8QznL4ifxkg5nUakQL4aAwNTCREWrDdgv/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "to_": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB",
        "amount": "0.01",
        "description": "Transaction [CURL]"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "2d4217e45c1e3ff6a1257a95662eebce30bb6ac195e874fb3fbcd337dff5f464"
        }
    }
    

    Wallet's transactions

    The diff in comparison with Wallet's address transactions is that you need to specify the sender address(es) (from_ field in requests)

    Create transaction (ETH)

    Parameter Description
    from_ Sender address
    to_ Recipient address
    description Transaction description
    gas_price GasPrice in ether
    gas_limit GasLimit
    amount Amount in ether

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/acded3fc-5144-4726-b45b-d83fa56136b0/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "from_": "0x822c09d5f89261c02d4fc0bb65bb45c7ea234efe",
        "to_": "0x8abAb4093391340180CACe15404866499bb7D701",
        "description": "Transaction [CURL]",        
        "gas_price": "0.0000000045",
        "gas_limit": 21000,
        "amount": "0.0000000000356"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "0x7a3ba664212845234dba3cc6ed37d1279226255d6d7878e2544a1b19f02d7f21"
        }
    }
    

    Create transaction (TOKEN)

    Parameter Description
    from_ Sender address
    to_ Recipient address
    description Transaction description
    gas_price GasPrice in ether
    gas_limit GasLimit
    amount Amount in tokens
    use_liquidity_wallet_for_fee Payment of commission with liquidity wallet (true/false)

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/ae8e53dd-c42e-43b1-9b6f-eecb2c4aa934/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "from_": "0x2c6a31f12c1b10ed0506afb104d4aab6be3333b1",
        "to_": "0x8abAb4093391340180CACe15404866499bb7D701",
        "description": "Transaction [CURL]",
        "gas_price": "0.0000000001",
        "gas_limit": 150000,
        "amount": "100.005",
        "use_liquidity_wallet_for_fee": false
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "0x1cc19b3a7f80d12b992c5bed3f101548b374d2c9c4804fde4d02508c36e4fcbc"
        }
    }
    

    Create transaction (BTC)

    Parameter Description
    from_ Sender addresses
    to_ Recipient addresses with amount
    description Transaction description
    fee "fastestFee", "halfHourFee", "hourFee" or value in bitcoin

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/45346ce2-b905-49f9-8463-cb0959c93784/transactions \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "from_": ["2N8QznL4ifxkg5nUakQL4aAwNTCREWrDdgv", "2N14ygepzQ51ymqw4WnUnPcu4cQkJ29EVgj"],
            "to_": [
                {
                    "amount": "0.0001",
                    "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
                },
                {
                    "amount": "0.000013",
                    "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
                }
            ],
            "description": "Transaction [CURL]",
            "fee": "hourFee"
        }'
    

    The above command returns JSON structured like this: json { "data": { "hash": "44ea4b8e6ba8d4408e5d4d0e101a7c0cb0ad4391350dd1d885b4621a32ff9d30" } }

    Create transaction (USDT)

    Parameter Description
    from_ Sender addresses
    to_ Recipient addresses
    amount Amount

    POST https://cryptoprocessing.io/api/v1/wallets/:wallet_id/transactions

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/73b809fb-0332-44ec-1ac9-49a247c3292a/transactions \
      -H 'Authorization:  Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
          "from_": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX",
          "to_": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB",
          "amount": "0.01"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "hash": "44ea4b8e6ba8d4408e5d4d0e101a7c0cb0ad4391350dd1d885b4621a32ff9d30"
        }
    }
    

    Wallet's webhooks

    With the help of webhooks you will receive notifications about transactions in the blockchain. Maximum number of webhooks 20.

    Webhook object

    Example

    {
        "id": "746d6b9e-7ce2-4231-87ea-d746a6f40db2",
        "url": "https://emample.com/endpoint",
        "max_confirmations": 6,
        "max_retries": 3
    }
    

    Represents webhook object

    Attributes:

    Attribute Description
    id Webhook ID
    url Webhook url
    max_confirmations The number of transaction confirmations in the blockchain to be notified about. Valid value from 0 to 100
    max_retries Maximum number of attempts to send a webhook. Valid value from 0 to 100

    Create webhook

    POST https://cryptoprocessing.io/api/v1/wallets/:id/webhooks

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/webhooks \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "url": "https://emample.com/endpoint",
        "max_confirmations": 6,
        "max_retries": 3
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "485380ca-5b59-4236-976c-20429c68e3ff",
            "url": "https://emample.com/endpoint",
            "max_confirmations": 6,
            "max_retries": 3
        }
    }
    

    Return webhooks

    GET https://cryptoprocessing.io/api/v1/wallets/:id/webhooks

    Example request

    curl -X GET \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/webhooks \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json'
    

    The above command returns JSON structured like this:

    {
        "_metadata": {
            "total": 2
        },
        "data": [
            {
                "id": "f6303175-c86e-4ff4-81b8-40f23e6b3402",
                "url": "https://emample.com/endpoint1",
                "max_confirmations": 2,
                "max_retries": 1
            },
            {
                "id": "485380ca-5b59-4236-976c-20429c68e3ff",
                "url": "https://emample.com/endpoint2",
                "max_confirmations": 6,
                "max_retries": 3
            }
        ]
    }
    

    Delete webhook

    DELETE https://cryptoprocessing.io/api/v1/wallets/:id/webhooks/:webhook_id

    Example request

    curl -X DELETE \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/webhooks/cd0d8b1d-b20a-41f0-80d1-faf2c4629a82 \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json'
    

    The above command returns only HTTP code (204)

    Webhook request

    Represents the request body from our server.

    Possible attribute values.

    event.event_type:
    UPDATE
    CREATE
    DELETE
    PENDING
    QUEUED
    FAILED
    SUCCESS

    transaction.type:
    receive
    send
    sendraw
    send_token

    Webhook for ETH

    {
      "account": {
        "id": "1f02413b-c08e-1eef-b3b7-f6b07c136d01"
      },
      "transaction": {
        "hash": "0x976d866a7e5cb9f0106fd74f48b4ebf9f484067cf786a541b012099e28fbd2a6",
        "position": null,
        "from_address": "0x235cE7409D8Dfc72D0B6377761dc9c20e3967198",
        "to_address": "0x8cbbbf681ee97e4bf86fa54ae171d7efa108d867",
        "value": 2133990000000000,
        "gas_price": 7000000000,
        "nonce": 0,
        "input_data": "0x",
        "type": "receive"
      },
      "event": {
        "event_type": "SUCCESS",
        "event_group": "TX"
      },
      "block_number": 5981239,
      "confirmation": 0
    }
    

    Webhook for TOKEN

    {
      "account": {
        "id": "d18108eb-bee5-4b41-be5b-e6156a496147"
      },
      "transaction": {
        "hash": "0x8abb8862899c19c04b7ce517d54cd6a5aabd5858683be854a2f634e3dd9990a0",
        "position": 0,
        "from_address": "0x274F3c32C90517975e29Dfc209a23f315c1e5Fc7",
        "to_address": "0xefbd0c505ad422134e6cd1a8af63b9c70ed538e9",
        "value": 1.0085e+21,
        "gas_price": 50000000000,
        "nonce": 134458,
        "input_data": "0xa9059cbb000000000000000000000000efbd0c505ad422134e6cd1a8af63b9c70ed538e9000000000000000000000000000000000000000000000036abbfbebced720000",
        "type": "receive",
        "currency": "ABX"
      },
      "event": {
        "event_type": "UPDATE",
        "event_group": "TX"
      },
      "block_number": 6937111,
      "confirmation": 3
    }
    

    Webhook for BTC

    {
      "event": {
        "event_type": "CREATE",
        "event_group": "TX"
      },
      "block_number": null,
      "account": {
        "id": "1af71414-bdf1-4a16-9b41-133f5b6b9ae1"
      },
      "confirmation": 0,
      "transaction": {
        "ins": [
          {
            "script": "47304402207a8e712b394f5abb98f2f3c710babe8dbc7b2da7e57aa3dfcbbed08807b90c2c022055cd332d047cce7eeff4bd8b319b90a5899811d22f8e7f8fa32fda07a91e95d80121035a9347865719fe1f7aae59dcb19f6eb70a471808d5424a41013177dbab92b26a",
            "address": "13jrfpw3tRppxNrfaBxmWtrKnAG6EEteUa",
            "position": 0,
            "previous_hash": "c917b524fc65a378e872bcc65c86c751246d5be7d4708f4e299a0026cfc89645"
          },
          {
            "script": "473044022002724d5e5216296bd34e94afc617bbd12258efd2efac2e94da6655c843f4d8e4022047ada12af99bb0fa31a6f2dc7022fb804aa52dbd96e6e63e4fa3b29dbcbf5e780121036a06338df7b1af63e76e7f46af27874762ca5d87cd9be8cb21043a57d7a42b08",
            "address": "14sQ2ERZaeEUHXZ94ZAbjuKbPaeSuisDYp",
            "position": 0,
            "previous_hash": "131091397a2c3ae643af545d8aa5f9f2409b78aef3914bb9f9100d288b11205e"
          }
        ],
        "outs": [
          {
            "position": 0,
            "address": "32ZVTU6oHMBqMemArPaQuXtV2zroMqZ2to",
            "script": "a914098bc818d1e632a9bf9023d49ff5f50ad19d54d987",
            "value": 808035
          },
          {
            "position": 1,
            "address": "18SJDwJKYpnKppedyBZpURgFrjHqveEGf1",
            "script": "76a9145191a816dec73e10c4de7dbaebba8d8785be1d7d88ac",
            "value": 2028090
          }
        ],
        "hash": "964755b5fdff53807a9df96a33bfd5b7af832beb827d5117f181a08ede0fba7c",
        "lock_time": 538363,
        "position": null
      }
    }
    

    Wallet's Webhooks for Outgoing Transactions

    Webhook Payload

    Example for a new operation

    {
      "approved": false,
      "approved_at": null,
      "created_at": "2019-12-05T22:31:19.854Z",
      "data": {
        "type": "send",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "from_": [
          "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx"
        ],
        "fee": "hourFee"
      },
      "declared_params": {
        "id": "6d121844-31d4-4de8-8320-5dd17f36193e",
        "from_": "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "fee": "hourFee"
      },
      "declined": false,
      "declined_at": null,
      "error": null,
      "has_error": null,
      "id": "3cafa58f-9725-4eca-93ff-59ad07767bb6",
      "lock_version": 0,
      "result": null,
      "txid": null,
      "updated_at": "2019-12-05T22:31:19.854Z",
      "wallet_id": "6d121844-31d4-4de8-8320-5dd17f36193e"
    }
    

    Example for a declined operation

    {
      "approved": false,
      "approved_at": null,
      "created_at": "2019-12-05T22:31:19.854Z",
      "data": {
        "type": "send",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "from_": [
          "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx"
        ],
        "fee": "hourFee"
      },
      "declared_params": {
        "id": "6d121844-31d4-4de8-8320-5dd17f36193e",
        "from_": "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "fee": "hourFee"
      },
      "declined": true,
      "declined_at": "2019-12-05T22:52:45.948Z",
      "error": null,
      "has_error": null,
      "id": "3cafa58f-9725-4eca-93ff-59ad07767bb6",
      "result": null,
      "txid": null,
      "updated_at": "2019-12-05T22:52:45.960Z",
      "wallet_id": "6d121844-31d4-4de8-8320-5dd17f36193e"
    }
    

    Example for approved operation

    {
      "approved": true,
      "approved_at": "2019-12-05T22:54:57.667Z",
      "created_at": "2019-12-05T22:52:35.984Z",
      "data": {
        "type": "send",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "from_": [
          "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx"
        ],
        "fee": "hourFee"
      },
      "declared_params": {
        "id": "6d121844-31d4-4de8-8320-5dd17f36193e",
        "from_": "2MxDEYUuFaVHY5gRsLhodscU3rQ3gcxxNXx",
        "to_": [
          {
            "amount": 50000,
            "address": "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
          }
        ],
        "fee": "hourFee"
      },
      "declined": false,
      "declined_at": null,
      "error": null,
      "has_error": false,
      "id": "784b1d57-0364-449c-a71c-967143ea01a0",
      "result": {
        "status": "success",
        "transaction": "4ba3d9942f6f882ab356707beb5ee54c3e4a79a933cb3aca004bdf13e5fd37c8"
      },
      "txid": "4ba3d9942f6f882ab356707beb5ee54c3e4a79a933cb3aca004bdf13e5fd37c8",
      "updated_at": "2019-12-05T22:55:00.494Z",
      "wallet_id": "6d121844-31d4-4de8-8320-5dd17f36193e"
    }
    

    Exchange Callbacks

    Callback object

    Example

    {
        "orders": [
            {
                "id": "d136f2e0-c938-4596-b226-140d557d5eda",
                "wallet_id": "a0f1f57d-322e-4a90-9f60-ca17387fa2c5",
                "address": "39Sqhiw9KVWWLBkHKRkMohatFnUhy7esYm",
                "tx_hash": "8b4f535d4bae8e6219ee2f9be279a0a2ac6256573fc38df6a49e9f2e868d308e",
                "amount": "1.000023",
                "currency": "BTC",
                "filled": [
                    {
                        "amount": "7960.02",
                        "currency": "USD",
                    }
                ]
            }
        ]
    }
    

    Callbacks is used to sent notifications once exchange order is executed.

    Attributes:

    Attribute Description
    id Unique order ID
    wallet_id Wallet ID
    address Address was used for deposit
    tx_hash Transaction ID was used for deposit
    amount Sold amount
    currency Wallet currency
    filled Array of stock orders values

    Wallet's payment forwarding

    Payment forwarding points to what address to transfer the arriving money.

    Payment forwarding object

    Example

    {
        "id": "a1c28479-6e6c-4504-87ed-ea56ab09cafc",
        "address": "1LpkYGhsQEeE11KmsxdTmC6kM1vo1mk7b8",
        "blocks_count": 1,
        "fee": "0.0000001"
    }
    

    Example

    {
        "address": "0xE0bB087dc0F751F2b87E1323f1700F514EB635f0",
        "blocks_count": 1,
        "gas_price": "0.0003"
    }
    

    Represents webhook object

    Attributes:

    Attribute Description
    id Payment forwarding ID
    address The address to which money will be transferred
    blocks_count The expected number of confirmations for the incoming transaction. Valid value from 0 to 100
    gas_price GasPrice for ETH
    fee Fee for BTC

    Create payment forwarding

    POST https://cryptoprocessing.io/api/v1/wallets/:id/payment_forwarding

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/payment_forwarding \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "address": "1LpkYGhsQEeE11KmsxdTmC6kM1vo1mk7b8",
        "blocks_count": 1,
        "fee": "0.000001"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "d220089b-8cef-4374-968b-f1746354e840",
            "address": "1LpkYGhsQEeE11KmsxdTmC6kM1vo1mk7b8",
            "blocks_count": 1,
            "fee": "0.000001"
        }
    }
    

    Return payment forwarding

    GET https://cryptoprocessing.io/api/v1/wallets/:id/payment_forwarding

    Example request

    curl -X GET \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/payment_forwarding \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "d220089b-8cef-4374-968b-f1746354e840",
            "address": "1LpkYGhsQEeE11KmsxdTmC6kM1vo1mk7b8",
            "blocks_count": 1,
            "fee": "0.000001"
        }
    }
    

    Update payment forwarding

    PUT https://cryptoprocessing.io/api/v1/wallets/:id/payment_forwarding

    Example request

    curl -X PUT \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/payment_forwarding \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "address": "1N8hwYGo2uvFGr6z1Hysp3j7V9nBrZ1dmm",
        "blocks_count": 2,
        "fee": 0.000002"
    }'
    

    The above command returns JSON structured like this:

    {
        "data": {
            "id": "d220089b-8cef-4374-968b-f1746354e840",
            "address": "1N8hwYGo2uvFGr6z1Hysp3j7V9nBrZ1dmm",
            "blocks_count": 2,
            "charge": "0.000002"
        }
    }
    

    DELETE payment forwarding

    DELETE https://cryptoprocessing.io/api/v1/wallets/:id/payment_forwarding

    Example request

    curl -X DELETE \
      https://cryptoprocessing.io/api/v1/wallets/1cf72914-d5fc-425b-ad72-ca9320d4cbcf/payment_forwarding \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json'
    

    The above command returns only HTTP code (204) if payment forwarding removed and code (404) if payment forwarding for wallet doesn't exist

    Wallet's seed

    Seed object

    Example

    {
        "seed": "task olympic spoon remove answer method divert wet stick stuff cause trick",
        "segwit_type": "non_native"
    }
    

    Attributes:

    Attribute Description
    seed Seed recovery phrase
    segwit_type Only for bitcoin (legacy, non-native, native). Not required.

    Get wallet's seed

    GET https://cryptoprocessing.io/api/v1/wallets/:wallet_id/seed

    Example request

    curl -X GET \
      https://cryptoprocessing.io/api/v1/wallets/45346ce2-b905-49f9-8463-cb0959c93784/seed \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' 
    

    Example response

    {
        "data": {
            "seed": "task olympic spoon remove answer method divert wet stick stuff cause trick",
            "segwit_type": "non_native"
        }
    }
    

    Create wallet by seed phrase

    GET https://cryptoprocessing.io/api/v1/wallets/:wallet_id/seed

    Example request

    curl -X POST \
      https://cryptoprocessing.io/api/v1/wallets/seed \
      -H 'Authorization: Token <token>' \
      -H 'Content-Type: application/json' \
      -H 'Idempotency-Key: <token>' \
      -d '{
        "seed": "task olympic spoon remove answer method divert wet stick stuff cause trick",
        "name": "Wallet name",
        "currency": "BTC",
        "segwit_type": "native",
        "human": "Human name",
        "description": "Some description"
    }'
    

    Example response

    {
        "data": {
            "id": "8961afc0-e2da-4807-a517-e82909c135ee",
            "name": "Wallet name",
            "currency": "BTC",
            "human": "Human name",
            "description": "Some description",
            "system_fee_percent": "1.0",
            "merchant_fee_percent": "0.0",
            "created_at": "2018-08-29T10:51:39.283Z",
            "updated_at": "2018-08-29T10:51:39.881Z"
        }
    }
    

    Errors

    Processing uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with processing's servers (these are rare).

    Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

    Processing API uses the following error codes:

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

    Signing API requests

    Key generation

    The client on his side generates a public and private key based on the RSA256 algorithm. After that it sends only the public key to eugene@cryptoprocessing.io, this key will be used to validate all requests. Unsigned requests will be rejected.

    Create request signature

    Sample code for creating a signature:

    Base64.strict_encode64(OpenSSL::PKey::RSA.new(YOUR_PRIVATE_KEY).private_encrypt(Digest::SHA256.hexdigest("#{API_KEY}#{URL}#{BODY_STR}")))
    


    The signature is added to the Sign header of the request.

    Sample code to add a Sign header:

    post URL, params: JSON.load(BODY_STR), as: :json, headers: {
      "Content-Type": "application/json",
      "Authorization": "Token #{API_KEY}",
      "Sign": Base64.strict_encode64(OpenSSL::PKey::RSA.new(YOUR_PRIVATE_KEY).private_encrypt(Digest::SHA256.hexdigest("#{API_KEY}#{URL}#{BODY_STR}")))
    }
    


    Variable Meaning
    YOUR_PRIVATE_KEY private key
    API_KEY key generated in your account
    URL request URL (for example, https://cryptoprocessing.io/api/v1/ping)
    BODY_STR request body, if any

    Address validation

    Validate address

    To validate an address in mainnet, you need to make a request to cryptoprocessing.io domain. If you want to validate addresses in testnet, you need to make a request to testnet.cryptoprocessing.io domain.

    URL structure: /api/v1/validate/:currency/:address

    Attribute Description
    currency currency, available currencies: eth, btc
    address address for specified currency

    https://cryptoprocessing.io/api/v1/validate/btc/2NGZrVvZG92qGYqzTLjCAewvPZ7JE8S8VxE

    {
        "data": {
            "is_valid": false
        }
    }
    

    https://testnet.cryptoprocessing.io/api/v1/validate/btc/2NGZrVvZG92qGYqzTLjCAewvPZ7JE8S8VxE

    {
        "data": {
            "is_valid": true
        }
    }
    

    https://cryptoprocessing.io/api/v1/validate/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

    {
        "data": {
            "is_valid": true
        }
    }
    

    Invoice processing

    Invoice object

    Example

    {
        "id": "3cc95f4b-8b14-4c02-95e2-0002b77caa4d",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "NEW",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-28T10:10:34.791Z",
        "updated_at": "2020-12-28T10:10:34.791Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N84FHPk745t1Ws7vjTX2V4UTvDtwMVfzQq",
        "btc_amount": "0.045762499579444076",
        "btc_rate": "0.000045692133693556",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18"
    }
    

    Attributes:

    Attribute Description
    id Invoice ID
    store_id Store ID
    amount Amount set at invoice creation
    currency Settlement currency, available values: "EUR", "USD", "BTC"
    status Available statuses: "NEW", "PAID"
    success_redirect_url Redirect url for paid invoice
    error_redirect_url URL for "RETURN TO STORE" link
    created_at Time of creation
    updated_at Time of updating
    customer_email Customer email
    btc_address BTC address
    btc_amount BTC amount
    btc_rate BTC per settlement currency
    usd_amount USD amount
    usd_rate USD per settlement currency

    Create invoice

    POST https://cryptoprocessing.io/api/v1/checkout/stores/:store_id/invoices

    Example request

    curl --location --request POST 'https://cryptoprocessing.io/api/v1/checkout/stores/8f314370-83ab-4c00-8c77-c9874d4b2a6a/invoices' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Token <token>' \
    --data-raw '{
        "amount": "1001.54",
        "currency": "EUR",
        "customer_email": "customer@example.com",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error"
    }'
    

    The above command returns JSON structured like this:

    {
        "id": "165152de-4fde-4c40-ab3e-354a580c8e99",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "NEW",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-30T12:49:49.899Z",
        "updated_at": "2020-12-30T12:49:49.899Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW",
        "btc_amount": "0.044237474907194096",
        "btc_rate": "0.000044169453948114",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18"
    }
    

    Show invoice

    GET https://cryptoprocessing.io/api/v1/checkout/stores/:store_id/invoices/:invoice_id

    Example request

    curl --location --request GET 'http://cryptoprocessing.io/api/v1/checkout/stores/8f314370-83ab-4c00-8c77-c9874d4b2a6a/invoices/7e0eea17-5433-4879-b0e0-52081fbf7431' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Token <token>'
    

    The above command returns JSON structured like this:

    {
        "id": "165152de-4fde-4c40-ab3e-354a580c8e99",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "NEW",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-30T12:49:49.899Z",
        "updated_at": "2020-12-30T12:49:49.899Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW",
        "btc_amount": "0.044237474907194096",
        "btc_rate": "0.000044169453948114",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18"
    }
    

    Invoice webhook

    Callback object

    Example

    {
        "id": "165152de-4fde-4c40-ab3e-354a580c8e99",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "PAID",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-30T12:49:49.899Z",
        "updated_at": "2020-12-30T12:49:49.899Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW",
        "btc_amount": "0.044237474907194096",
        "btc_rate": "0.000044169453948114",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18"
    }
    

    Callbacks is used to sent notifications once invoice is updated.

    Deactivate invoice

    PUT https://cryptoprocessing.io/api/v1/checkout/invoices/:invoice_id/deactivate

    Example request

    curl -X PUT 'https://cryptoprocessing.io/api/v1/checkout/invoices/8f314370-83ab-4c00-8c77-c9874d4b2a6a/deactivate' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Token <token>' \
    -d ''
    

    The above command returns JSON structured like this:

    {
        "id": "165152de-4fde-4c40-ab3e-354a580c8e99",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "NEW",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-30T12:49:49.899Z",
        "updated_at": "2020-12-30T12:49:49.899Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW",
        "btc_amount": "0.044237474907194096",
        "btc_rate": "0.000044169453948114",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18",
        "activated": false
    }
    

    Activate invoice

    PUT https://cryptoprocessing.io/api/v1/checkout/invoices/:invoice_id/activate

    Example request

    curl -X PUT 'https://cryptoprocessing.io/api/v1/checkout/invoices/8f314370-83ab-4c00-8c77-c9874d4b2a6a/activate' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Token <token>' \
    -d ''
    

    The above command returns JSON structured like this:

    {
        "id": "165152de-4fde-4c40-ab3e-354a580c8e99",
        "store_id": "8f314370-83ab-4c00-8c77-c9874d4b2a6a",
        "amount": "1001.54",
        "currency": "EUR",
        "status": "NEW",
        "success_redirect_url": "https://example.com/process/success",
        "error_redirect_url": "https://example.com/process/error",
        "created_at": "2020-12-30T12:49:49.899Z",
        "updated_at": "2020-12-30T12:49:49.899Z",
        "customer_email": "customer@example.com",
        "btc_address": "2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW",
        "btc_amount": "0.044237474907194096",
        "btc_rate": "0.000044169453948114",
        "usd_amount": "1181.8172",
        "usd_rate": "1.18",
        "activated": true
    }