Navbar
Curl Python
  • Introduction
  • Quick Start
  • Authentication
  • Interacting with the API
  • Support Crypto List
  • Record Endpoint
  • Order Endpoint
  • Rate Endpoint
  • Error Codes
  • Introduction

    API EndPoint

    EndPoint: http://apiv2.dizpay.com/
    

    DizPay provides a simple and powerful API to integrate bitcoin, bitcoin cash, litecoin and ethereum payments into your business or application.

    This documentation provides information on available endpoints and how to interact with it.

    Quick Start

    Please look at DizPay Github.

    Authentication

    APP ID & APP KEY

    Please sign in and look for your APP ID and APP KEY. If you don't have account, please go Dizpay and submit registration applcation.

    Signature

    Interacting with DizPay API, you don't only need API arguments but also need APP ID and signature.

    Signature Generation Rules:

    The arguments, APP ID and APP KEY that are arranged in alphabetical, calculate the value of md5 as k1=v1&k2=v2&app_id=APP ID&app_key=APP KEY...

    Interacting with the API

    Status Codes

    Making requests

    When making requests, arguments must be passed as JSON with correct Content-Type header.

    DizPay API implements following POST requests.

    Support Crypto List

    Bitcoin, Bitcoin Cash, Ethereum, Litecoin, DASH, USDT and ERC20 Token.

    Record Endpoint

    Inquiry Crypto Balance Record

    Example Request

      curl http://apiv2.dizpay.com/member/query_assets_balance_record
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "uid": "58c1146-1ee999fa-azxwwer1", "create_begin_timestamp": "1541001600", "create_end_timestamp": "1541001700", "address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9", "currency_code": "ETH", "erc20_token": 0, "page": 1, "per_page": 5}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/query_assets_balance_record', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "uid": "58c1146-1ee999fa-azxwwer1",
        "address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "currency_code": "ETH",
        "erc20_token": 0,
        "create_begin_timestamp": "1541001600",
        "create_end_timestamp": "1541001700",
        "page": 1,
        "per_page": 5
      }, response_type='json')
    

    Example Response(200)

      {
        "total_pages": 1,
        "page": 1,
        "per_page": 5,
        "total_count": 1,
        "objects": [{
          "uid": "58c1146-1ee999fa-azxwwer1",
          "currency_code": "ETH",
          "erc20_token": 0,
          "created_at": "1541001650",
          "address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
          "extra": "",
          "current_amount": "1.00000000",
          "delta_amount": "1.00000000",
          "gateway_fee": "0E-8",
          "details": null
        }]
      }
    

    According to arguments and inquiry crypto balance record of member.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/query_assets_balance_record

    ARGUMENTS

    Parameter Type Required Description
    uid String Optional Unique identification code of member
    currency_code String Optional Crypto
    erc20_token Int Optional ERC20 Token:
    0 No
    1 Yes
    address String Optional Crypto address of member
    create_begin_timestamp Int Optional Starting time
    create_end_timestamp Int Optional End Time
    page Int Optional The number of current record page
    per_page Int Optional The number of record per page

    FIELD

    Field Description
    total_pages The total page of record
    total_count The total number of record
    gateway_fee The fee of record
    details The details of record, such as txid and other

    Order Endpoint

    Create Merchant Order

    Example Request

      curl http://apiv2.dizpay.com/member/create_merchant_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124", "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9", "currency_code": "ETH", "erc20_token": 0, "amount": "1", "extra": ""}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/create_merchant_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "currency_code": "ETH",
        "erc20_token": 0,
        "amount": "1",
        "extra": ""
      }, response_type='json')
    

    Example Response(200)

      {
        "amount": "1.00000000",
        "fee": "0E-8",
        "address": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "currency_code": "ETH",
        "erc20_token": 0,
        "status": 1,
        "txid": null,
        "extra": "",
        "created_at": 1541747271,
        "type": 8
      }
    

    According to demand, set arguments and create merchant order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/create_merchant_order

    ARGUMENTS

    Parameter Type Required Description
    number String Required Order number, globally unique
    currency_code String Required Crypto
    erc20_token Int Required ERC20 Token:
    0 No
    1 Yes
    amount String Required Amount
    to_address String Required Target crypto wallet address.
    extra String Required Extra message

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order

    Create Withdraw Order

    Example Request

      curl http://apiv2.dizpay.com/member/create_withdraw_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124", "address": "2RLVkXuZrSVhw9Ymm72csp99A8wufe76F8", "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9", "currency_code": "ETH", "erc20_token": 0, "amount": "1", "fee": "0.002", "extra": ""}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/create_withdraw_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "address": "2RLVkXuZrSVhw9Ymm72csp99A8wufe76F8",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "currency_code": "ETH",
        "erc20_token": 0,
        "amount": "1",
        "fee": "0.002",
        "extra": ""
      }, response_type='json')
    

    Example Response(200)

      {
        "amount": "1.00000000",
        "fee": "0.002",
        "address": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "currency_code": "ETH",
        "erc20_token": 0,
        "status": 1,
        "txid": null,
        "extra": "",
        "created_at": 1541747271,
        "type": 2
      }
    

    According to demand, set arguments and create withdraw order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/create_withdraw_order

    ARGUMENTS

    Parameter Type Required Description
    number String Required Order number, globally unique
    currency_code String Required Crypto
    erc20_token Int Required ERC20 Token:
    0 No
    1 Yes
    fee String Required Withdraw fee
    amount String Required Withdraw amount
    address String Required Crypto wallet address
    to_address String Required Target crypto wallet address.
    extra String Required Extra message

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order

    Create Transaction Order

    Example Request

      curl http://apiv2.dizpay.com/member/create_transaction_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124", "address": "2RLVkXuZrSVhw9Ymm72csp99A8wufe76F8", "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9", "currency_code": "ETH", "erc20_token": 0, "amount": "1", "fee": "0.002", "extra": ""}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/create_transaction_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "address": "2RLVkXuZrSVhw9Ymm72csp99A8wufe76F8",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "currency_code": "ETH",
        "erc20_token": 0,
        "amount": "1",
        "fee": "0.002",
        "extra": ""
      }, response_type='json')
    

    Example Response(200)

      {
        "currency_code": "ETH",
        "erc20_token": 0,
        "type": 1,
        "amount": "1.00000000",
        "paid_amount": "0E-8",
        "fee": "0.002",
        "address": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "status": 1,
        "txid": null,
        "extra": "",
        "created_at": 1541747271
      }
    

    According to demand, set arguments and create transaction order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/create_transaction_order

    ARGUMENTS

    Parameter Type Required Description
    number String Required Order number, globally unique
    currency_code String Required Crypto
    erc20_token Int Required ERC20 Token:
    0 No
    1 Yes
    fee String Required Transaction fee
    amount String Required Transaction amount
    address String Required Crypto wallet address
    to_address String Required Target crypto wallet address.
    extra String Required Extra message

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order

    Create Receipt Order

    Example Request

      curl http://apiv2.dizpay.com/member/create_charge_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124", "amount": "1", "currency_code": "ETH", "erc20_token": 0, "notify_url": "example.dizpay.com", "extra": ""}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/create_charge_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "amount": "1",
        "currency_code": "ETH",
        "erc20_token": 0,
        "notify_url": "example.dizpay.com",
        "extra": ""
      }, response_type='json')
    

    Example Response(200)

      {
        "status": 1,
        "amount": "1.00000000",
        "paid_amount": "0E-8",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "extra": "",
        "address": "",
        "fee": ""
        "to_address": ""
        "created_at": 1541747271,
        "currency_code": "ETH",
        "erc20_token": 0,
        "type": 4
      }
    

    According to demand, set arguments and create receipt order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/create_charge_order

    ARGUMENTS

    Parameter Type Required Description
    number String Required Order number, globally unique
    currency_code String Required Crypto
    erc20_token Int Required ERC20 Token:
    0 No
    1 Yes
    amount String Required Receipt amount
    extra String Required Extra message
    notify_url String Optional Deposit notify url

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order
    paid_amount Amount paid

    Inquiry Order

    Example Request

      curl http://apiv2.dizpay.com/member/query_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124",}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/query_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
      }, response_type='json')
    

    Example Response(200)

      {
        "status": 1,
        "amount": "1.00000000",
        "paid_amount": "0E-8",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "extra": "",
        "address": "",
        "fee": ""
        "to_address": ""
        "created_at": 1541747271,
        "currency_code": "ETH",
        "erc20_token": 0,
        "type": 4
      }
    

    According to order number, inquiry receipt order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/query_order

    ARGUMENTS

    Parameter Type Required Description
    number String Required Order number, globally unique

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order
    paid_amount Amount paid

    Pay Order

    Example Request

      curl http://apiv2.dizpay.com/member/pay_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124",}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/pay_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
      }, response_type='json')
    

    Example Response(200)

      {
        "amount": "1.00000000",
        "fee": "0.002",
        "address": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "currency_code": "ETH",
        "erc20_token": 0,
        "status": 2,
        "txid": null,
        "extra": "",
        "created_at": 1541747271,
        "type": 2
      }
    

    Set number and pay order corresponding to the order number.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/pay_order

    ARGUMENT

    Parameter Type Required Description
    number String Required Order number, globally unique

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order

    Cancel Order

    Example Request

      curl http://apiv2.dizpay.com/member/cancel_order
        -X POST
        -H 'Content-Type: application/json'
        -d '{"app_id": "dp7dBNHarMxGvY6EyJ", "signature": "58c11d46ee99f70595b04327414fedr4", "number": "8eb9bc53-75ea-4142-8a91-af89d224124",}'
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/cancel_order', json={
        "app_id": "dp7dBNHarMxGvY6EyJ",
        "signature": "58c11d46ee99f70595b04327414fedr4",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
      }, response_type='json')
    

    Example Response(200)

      {
        "amount": "1.00000000",
        "fee": "0.002",
        "address": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "to_address": "1DLVkXuZrSvhw9Ymm72csp99A8wufe76E9",
        "number": "8eb9bc53-75ea-4142-8a91-af89d224124",
        "currency_code": "ETH",
        "erc20_token": 0,
        "status": 4,
        "txid": null,
        "extra": "",
        "created_at": 1541747271,
        "type": 2
      }
    

    According to number, cancel order.

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/cancel_order

    ARGUMENT

    Parameter Type Required Description
    number String Required Order number, globally unique

    FIELD

    Field Description
    created_at Time
    status Order status:
    1 Processing
    2 Complete
    4 Cancel
    txid Serial number
    type Order type:
    1 Transaction Order
    2 Withdraw Order
    4 Receipt Order
    8 Merchant Order

    Rate-Endpoint

    Query Fiat Currency

    Example Request

      curl http://apiv2.dizpay.com/member/query_fiat_currency
        -X POST
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/query_fiat_currency')
    

    Example Response(200)

      {
        "country": "中华人民共和国",
        "country_code": "CN",
        "currency": "人民币元",
        "currency_code": "CNY",
        "usd_rate": "6.76879900",
      }
    

    Query fiat currency rate

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/query_fiat_currency

    ARGUMENTS

    Parameter Type Required Description
    currency_list String Optional Currency code(Separated by commas)

    Query Crypto Currency

    Example Request

      curl http://apiv2.dizpay.com/member/query_crypto_currency
        -X POST
    
      import requests
    
      r = requests.post('http://apiv2.dizpay.com/member/query_crypto_currency')
    

    Example Response(200)

      {
        "currency_code": "USDT",
        "erc20_token": 0,
        "usd_price": "1.00332100",
        "percent_change": "0.13558500",
      }
    

    Query crypto currency rate

    HTTP REQUEST

    POST http://apiv2.dizpay.com/member/query_crypto_currency

    ARGUMENTS

    Parameter Type Required Description
    currency_list String Optional Currency code(Separated by commas)

    Error Codes

    The status code return 400 and you can refer to the following information:

    Error Code Description
    1000 Field Format Error(Required, Range, Type)
    1001 Something does not exist
    1002 Something does not match
    1003 Something is invalid
    1008 Balance is not enough
    1051 Wallet Server went wrong