Withdraw

The withdraw easily allows you to send cryptocurrency to any address. The withdraw endpoint is a critical component of the Paybin platform, designed to complete the verification process of a withdrawal request. This endpoint confirms that the user has correctly received a small, random amount of cryptocurrency in their wallet, which they previously entered during the Start Verification Process. It ensures the accuracy and security of the withdrawal address.

Withdraw Request

  • Name
    PublicKey
    Type
    string
    Description

    Your Paybin Public Key, used to authenticate the request.

  • Name
    ReferenceId
    Type
    string
    Description

    A unique identifier for the withdrawal request, used for tracking and reconciliation. It links the withdrawal to a specific user transaction, improving auditability and management within the Paybin ecosystem.

  • Name
    Amount
    Type
    decimal
    Description

    The amount of cryptocurrency to be withdrawn, specified as a decimal value. This should match the quantity you wish to send to the destination address, ensuring precise and accurate transactions.

  • Name
    Symbol
    Type
    string
    Description

    The cryptocurrency symbol (e.g., ETH for Ethereum) to specify which currency you're withdrawing.

    See all Symbols
  • Name
    NetworkId
    Type
    integer
    Description

    The identifier for the blockchain network to use for the withdrawal, ensuring compatibility and security.

  • Name
    Address
    Type
    string
    Description

    The destination wallet address for the withdrawal, must be compatible with the specified currency and network.

    See how to validate withdraw address
  • Name
    Label
    Type
    string
    Description

    A user-provided label for the withdrawal request, used to easily identify and manage withdrawal addresses within the Paybin dashboard, ensuring efficient tracking and organization of transactions.

  • Name
    MerchantTransactionId
    Type
    string
    Description

    A unique identifier assigned by the merchant to track the withdrawal within their own business system. This ID helps in referencing and managing the withdrawal request for record-keeping, reconciliation, and business-specific tracking purposes.

  • Name
    Hash
    Type
    string
    Description

    A unique hash generated for the withdrawal request, serving as an additional layer of security and verification.

    How to create hash

    CryptoJS.MD5(data.Symbol + data.Amount + data.Address + data.MerchantTransactionId + secretKey).toString();
    

Withdraw Request

curl --location 'https://sandbox.paybin.io/v1/withdraw/add' \
--header 'X-Api-Key: {secretKey}' \
--header 'Content-Type: application/json' \
--data '{
  "PublicKey": "{publicKey}",
  "ReferenceId": "REF_001",
  "Amount": 0.123,
  "Symbol": "ETH",
  "Address": "0x883d6769e513bc63e757172cdbd5b5eef0806161",
  "Label": "ETH Withdraw",
  "MerchantTransactionId": "{WITHDRAW_REFERENCE_ID}",
  "Hash" : "{HASH}",
  "TfaCode":"", //optional
  "Email":""//optional
}   '

Response

  {
      "apiVersion": "1.0.0.0",
      "data": {
          "txId": "0xd6471185...52ac3d443f2dca79cc56f576e2ca158",
          "explorerUrl": "https://etherscan.io/tx/0xd6471185...52ac3d443f2dca79cc56f576e2ca158",
          "success": true
      },
      "code": 200,
      "message": "OK"
  }

Exception

{
  "apiVersion": "1.0.0.0",
  "data": null,
  "code": 400,
  "message": "Z503"
}

Withdraw Verification

The Withdraw Verification at Paybin is designed to ensure the accuracy and security of cryptocurrency withdrawals. Its main goal is to prevent errors by verifying that funds are sent to the correct address. Here’s a concise overview of the process

  1. Start: Users initiate a withdrawal request and input the destination wallet address.
  2. Verify Paybin sends a small, random amount of cryptocurrency to the specified address. Users must verify their withdrawal request by confirming the exact amount received at their address.

Verification Start

The Verification Start is essential for initiating secure cryptocurrency withdrawals with Paybin. It details the withdrawal's key aspects, such as cryptocurrency type, destination wallet address, and the blockchain network. This process incorporates security measures and unique identifiers to ensure each transaction's integrity and traceability. By integrating this process, users gain a reliable and straightforward way to manage their cryptocurrency assets, enhancing both security and accessibility.

  • Name
    PublicKey
    Type
    string
    Description

    Your Paybin Public Key, used to authenticate the request.

  • Name
    ReferenceId
    Type
    string
    Description

    A unique identifier for the withdrawal request, facilitating easy tracking and reconciliation. The ReferenceId can typically be your member GUID or a transaction ID, similar to those used in e-commerce platforms like Amazon or Shopify baskets. This identifier helps in uniquely associating the withdrawal request with a specific user transaction or account, enhancing the auditability and management of transactions within the Paybin ecosystem.

  • Name
    Symbol
    Type
    string
    Description

    The cryptocurrency symbol (e.g., ETH for Ethereum) to specify which currency you're withdrawing.

    See all Symbols
  • Name
    NetworkId
    Type
    integer
    Description

    The identifier for the blockchain network to use for the withdrawal, ensuring compatibility and security.

  • Name
    Address
    Type
    string
    Description

    The destination wallet address for the withdrawal, must be compatible with the specified currency and network.

  • Name
    Label
    Type
    string
    Description

    A required label, provided by the user, for the withdrawal request. This label aids in the easy identification and management of withdrawal addresses within the Paybin dashboard. By utilizing this feature, users ensure efficient tracking and organization of specific transactions or addresses, enhancing the overall management of their cryptocurrency transactions.

  • Name
    Hash
    Type
    string
    Description

    A unique hash generated for the withdrawal request, serving as an additional layer of security and verification.

Start verification

curl -X POST 'https://sandbox.paybin.io/v1/verify/start' \
  -H 'X-Api-Key: {secretKey}' \
  -H 'Content-Type: application/json' \
  --data '{
    "PublicKey": "{publicKey}",
    "ReferenceId": "REF_001",
    "Symbol": "ETH",
    "NetworkId": 1,
    "Address": "0x883d6769e513bc63e757172cdbd5b5eef0806161",
    "Label": "My Saving Account",
    "Hash": "b4b2d3ad968055f92c69e3d1e514f6c1"
}'

Response

{
    "apiVersion": "1.0.0.0",
    "data": {
        "txId": "0xd6471185...52ac3d443f2dca79cc56f576e2ca158",
        "amount": 0.00004912
    },
    "code": 200,
    "message": "OK"
}

Exception

{
  "apiVersion": "1.0.0.0",
  "data": null,
  "code": 400,
  "message": "Z503"
}

Verify Address

The Verify endpoint is a critical component of the Paybin platform, designed to complete the verification process of a withdrawal request. This endpoint confirms that the user has correctly received a small, random amount of cryptocurrency in their wallet, which they previously entered during the Start Verification Process. It ensures the accuracy and security of the withdrawal address.

  • Name
    PublicKey
    Type
    string
    Description

    Your Paybin Public Key, used to authenticate the request. This key is essential for verifying the identity of the requestor and securing communication between your system and Paybin's API.

  • Name
    ReferenceId
    Type
    string
    Description

    A unique identifier for the withdrawal request, facilitating easy tracking and reconciliation. The ReferenceId can typically be your member GUID or a transaction ID, akin to those used in e-commerce platforms like Amazon or Shopify. This identifier is crucial for associating the withdrawal request with a specific user transaction or account, thereby enhancing the auditability and management of transactions within the Paybin ecosystem.

  • Name
    Symbol
    Type
    string
    Description

    The cryptocurrency symbol (e.g., ETH for Ethereum), indicating the type of currency involved in the withdrawal. This specifies the blockchain network your withdrawal request pertains to.

    See all Symbols
  • Name
    NetworkId
    Type
    integer
    Description

    The identifier for the blockchain network on which the transaction will be processed. This ensures the transaction is executed on the correct network, corresponding to the cryptocurrency type.

    See all Network IDs
  • Name
    Amount
    Type
    decimal
    Description

    The exact amount of cryptocurrency that was sent to the user's wallet for verification purposes. Users must confirm this amount to prove ownership of the destination wallet, a critical step in securing transactions.

  • Name
    Hash
    Type
    string
    Description

    A unique hash generated for the verification transaction, providing an additional layer of security. This hash serves as a cryptographic proof of the transaction, further ensuring its integrity and authenticity.

Verify

curl -X POST 'https://sandbox.paybin.io/v1/verify/confirmAmount' \
 -H 'X-Api-Key: {secretKey}' \
 -H 'Content-Type: application/json' \
 --data '{
    "PublicKey":"{publicKey}",
    "ReferenceId":"REF_001",
    "Symbol":"ETH",
    "NetworkId":1,
    "Amount":0.00003406,
    "Hash": "b4b2d3ad968055f92c69e3d1e514f6c1"
}'

Response

{
  "apiVersion": "1.0.0.0",
  "data": {
      "isVerified": true
  },
  "code": 200,
  "message": "OK"
}

Upon submission, the Verify endpoint processes the provided data to confirm the withdrawal request's legitimacy. Users must accurately report the received amount, as specified in the Amount field, to verify their control over the destination wallet. Successful verification through this endpoint is a crucial step towards completing the withdrawal process, ensuring both the security of transactions and the integrity of user data.

Fetch Verified Addresses

This section outlines the process for retrieving a list of verified withdrawable addresses through the Paybin API, ensuring secure and streamlined withdrawals to verified addresses.

  • Name
    PublicKey
    Type
    string
    Description

    Your Paybin Public Key, used to authenticate the request. This key is essential for verifying the identity of the requester and securing communication between your system and Paybin's API.

  • Name
    ReferenceId
    Type
    string
    Description

    A unique identifier for the request, aiding in tracking and management. This reference facilitates the retrieval of addresses specific to your account and transaction needs.

Fetch Addresses

curl -X POST 'https://sandbox.paybin.io/v1/merchant/withdraw/withdrawableAssets' \
  -H 'X-Api-Key: {secretKey}' \
  -H 'Content-Type: application/json' \
  --data '{
    "PublicKey":"{publicKey}",
    "ReferenceId":"REF_001"
}'

Response

{
"apiVersion": "1.0.0.0",
"data": [
    {
        "symbol": "ETH",
        "networkId": 1,
        "referenceId": "REF_001",
        "address": "0x883d6769e513bc63e757172cdbd5b5eef0806161"
    }
],
"code": 200,
"message": "OK"
}

Was this page helpful?