Transfers & Payments

Learn how to make transfers and payments.

Before You Begin

Make sure you have the allocation id noted down for two accounts. If you don't have 2 accounts, check out the creating an account guide.

Transfer Between Accounts

In the example below, we'll be simulating an internal transfer between Conduit accounts.

Transfer 200 USDC

1. Make a POST request to https://sandbox.conduit.financial/transactions with the following body but replace the source with the account allocation id you want to transfer from and the destination with the account allocation id you want to receive:

Copy
Copied
{
  "data": {
    "attributes": {
      "assetType": "asset:eth:USDC",
      "amount": "200000000",
      "source": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "destination": "id:allc:2JEnUNHhSRAcp9Gj1SQEtnPk5mB"
    }
  }
}
Note

The amount attribute is a string and represents an integer indicating the number of the smallest unit of the corresponding asset type. For example, USDC is divided into millionths of a unit so the quantity 300 USDC is represented as "300000000"


2. If successful, you will see a similar response from the API:

Copy
Copied
{
  "data": {
    "id": "id:trxn:2JEnnjddu00clamWmVMXs4fxVcz",
    "type": "transaction",
    "attributes": {
      "createdAt": "2022-12-21T19:51:20.587Z",
      "createdBy": "client",
      "effectiveDate": "2022-12-21",
      "amount": "200000000",
      "source": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "destination": "id:allc:2JEnUNHhSRAcp9Gj1SQEtnPk5mB",
      "status": "pending",
      "assetType": "asset:eth:USDC"
    },
    "relationships": {
      "source": {
        "links": {
          "self": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/relationships/source",
          "related": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/source"
        },
        "data": {
          "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
          "type": "id"
        }
      },
      "destination": {
        "links": {
          "self": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/relationships/destination",
          "related": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/destination"
        },
        "data": {
          "id": "id:allc:2JEnUNHhSRAcp9Gj1SQEtnPk5mB",
          "type": "id"
        }
      },
      "quote": {
        "links": {
          "self": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/relationships/quote",
          "related": "/transactions/id:trxn:2JEnnjddu00clamWmVMXs4fxVcz/quote"
        },
        "data": null
      }
    }
  }
}

Check Balance

Now that your transfer is completed, the transferred USDC amount should be deducted from the source account and added to the destination account. Let's verify this by querying both accounts and looking at the balance.

Source Account

1. Make a GET request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id} with the source account id.

2. If successful, you will see a response from the API that shows the balance decreased by the transferred amount:

Copy
Copied
{
  "data": {
    "id": "id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE",
    "type": "account",
    "attributes": {
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "100000000"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "400000000"
          }
        ]
      },
      "wallets": [
        {
          "assetType": "asset:eth:USDC",
          "networkId": "net:eth:ropsten",
          "address": "wlt:eth:0x274ed96d9c5c612dc6bcd36150e3ab7c87de7425"
        }
      ]
    },
    "relationships": {
      "account-holders": {
        "links": {
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/account-holders",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/account-holders"
        },
        "data": [
          {
            "id": "id:ahl:2J8Ocs7KFZJt3CMPi9f0x8UCCQ0",
            "type": "account-holder"
          }
        ]
      },
      "allocations": {
        "links": {
          "next": null,
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/allocations",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/allocations"
        },
        "data": [
          {
            "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
            "type": "allocation"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "poolName": "default_pool_usdc",
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "100000000"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "accruedYield": [
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      }
    }
  ]
}

Destination Account

Pending Transactions

Pending transactions can take up to 5 minutes to release in our Sandbox environment so please give it a little bit of time before trying the request below..

1. Make a GET request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id} with the destination account id.

2. If successful, you will see a response from the API that shows the balance increased by the transferred amount:

Copy
Copied
{
  "data": {
    "id": "id:acct:2JEnUGBeE6SdlJpnlM5ITnqTfvW",
    "type": "account",
    "attributes": {
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "200000000"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      },
      "wallets": [
        {
          "assetType": "asset:eth:USDC",
          "networkId": "net:eth:ropsten",
          "address": "wlt:eth:0xe06779fa1182bb3616faeb2dd02fd0c2575d7d3a"
        }
      ]
    },
    "relationships": {
      "account-holders": {
        "links": {
          "self": "/accounts/id:acct:2JEnUGBeE6SdlJpnlM5ITnqTfvW/relationships/account-holders",
          "related": "/accounts/id:acct:2JEnUGBeE6SdlJpnlM5ITnqTfvW/account-holders"
        },
        "data": [
          {
            "id": "id:ahl:2IycGFZIMfML3vNr2VLIThFRByD",
            "type": "account-holder"
          }
        ]
      },
      "allocations": {
        "links": {
          "next": null,
          "self": "/accounts/id:acct:2JEnUGBeE6SdlJpnlM5ITnqTfvW/relationships/allocations",
          "related": "/accounts/id:acct:2JEnUGBeE6SdlJpnlM5ITnqTfvW/allocations"
        },
        "data": [
          {
            "id": "id:allc:2JEnUNHhSRAcp9Gj1SQEtnPk5mB",
            "type": "allocation"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "id:allc:2JEnUNHhSRAcp9Gj1SQEtnPk5mB",
      "poolName": "default_pool_usdc",
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "200000000"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "accruedYield": [
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      }
    }
  ]
}

External Payments or Transfers

Pay 100 USDC

1. Make a POST request to https://sandbox.conduit.financial/transactions with the following body but replace the source with the account allocation id you want to pay from and the destination with an external wallet address you want to pay to:

Copy
Copied
{
  "data": {
    "attributes": {
      "assetType": "asset:eth:USDC",
      "amount": "100000000",
      "source": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "destination": "wlt:eth:0x0000000000000000000000000000000000000000"
    }
  }
}
Note

The amount attribute is a string and represents an integer indicating the number of the smallest unit of the corresponding asset type. For example, USDC is divided into millionths of a unit so the quantity 500 USDC is represented as "500000000"


2. If successful, you will see a similar response from the API:

Copy
Copied
{
  "data": {
    "id": "id:trxn:2JEpnum6kwvpVjONCCX90DPcb25",
    "type": "transaction",
    "attributes": {
      "createdAt": "2022-12-21T20:07:47.571Z",
      "createdBy": "client",
      "effectiveDate": "2022-12-22",
      "amount": "100000000",
      "source": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "destination": "wlt:eth:0x0000000000000000000000000000000000000000",
      "status": "pending",
      "assetType": "asset:eth:USDC"
    },
    "relationships": {
      "source": {
        "links": {
          "self": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/relationships/source",
          "related": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/source"
        },
        "data": {
          "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
          "type": "id"
        }
      },
      "destination": {
        "links": {
          "self": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/relationships/destination",
          "related": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/destination"
        },
        "data": {
          "id": "wlt:eth:0x0000000000000000000000000000000000000000",
          "type": "wallet"
        }
      },
      "quote": {
        "links": {
          "self": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/relationships/quote",
          "related": "/transactions/id:trxn:2JEpnum6kwvpVjONCCX90DPcb25/quote"
        },
        "data": null
      }
    }
  }
}

Check Balance

Now that your payment is completed, the USDC paid should be deducted from your account. Let's verify this by querying the account and looking at the balance.

1. Make a GET request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id} with the source account id.

2. If successful, you will see a response from the API that shows the balance decreased by the paid amount:

Copy
Copied
{
  "data": {
    "id": "id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE",
    "type": "account",
    "attributes": {
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "500000000"
          }
        ]
      },
      "wallets": [
        {
          "assetType": "asset:eth:USDC",
          "networkId": "net:eth:ropsten",
          "address": "wlt:eth:0x274ed96d9c5c612dc6bcd36150e3ab7c87de7425"
        }
      ]
    },
    "relationships": {
      "account-holders": {
        "links": {
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/account-holders",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/account-holders"
        },
        "data": [
          {
            "id": "id:ahl:2J8Ocs7KFZJt3CMPi9f0x8UCCQ0",
            "type": "account-holder"
          }
        ]
      },
      "allocations": {
        "links": {
          "next": null,
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/allocations",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/allocations"
        },
        "data": [
          {
            "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
            "type": "allocation"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "poolName": "default_pool_usdc",
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "accruedYield": [
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      }
    }
  ]
}

Next Steps

Now that you know how to transfer and make payments, learn about how we screen for sanctioned users to stay complaint.