Orangepill Docs
  • Getting Started
    • Introduction
  • Orangepill API
    • Overview
    • Realms and Admins
    • Identities and Users
    • Persons and Companies
    • Messaging Channels
    • Digital Assets
    • Custom Digital Assets
    • Virtual Currencies
    • Ramp Accounts
    • Deposit Accounts
    • Virtual Accounts
    • Aliases
    • Withdrawal
    • Transactions
    • Payment gateways
    • Payouts
    • KYC
  • SmartApps
    • Payment Request
      • Payment Request v1.0
    • Forwarding Transactions
    • Blockchain Deposits
    • Accept Blockchain Payments
    • Orderbook
    • Exchange Rates
  • WebSocket Subscriptions
  • Extensions
    • Infobip People CDP
  • On Ramps and Off Ramps
  • Integrations
    • Infobip Exchange
  • Tutorials
    • Conversational Wallet
    • Crypto Payments Processor
      • Project Setup
      • Merchants Onboarding
      • Process Payment
      • Withdraw Revenue
      • Build Reports
      • Automatic Revenue Fees
    • Cryptocurrency Exchange
    • Simple ETH Wallet
  • Orangepill API Reference
Powered by GitBook
On this page
  • Create Deposit
  • Deposit status
  • List deposits

Was this helpful?

  1. SmartApps

Blockchain Deposits

Use Apps.Deposit to forward blockchain deposit to virtual account.

PreviousForwarding TransactionsNextAccept Blockchain Payments

Last updated 10 months ago

Was this helpful?

To simplify acceptance of digital assets you can use Deposit SmartApp. Deposit SmartApp will orchestrate automatic forwarding of deposit to related Virtual account.

Amount received to Virtual account will be diminished for the amount of blockchain fee paid for automatic withdrawal from Deposit account to Ramp account.

Create Deposit

Use seal object to store immutable data about the deposit.

Use data object to store variable data about the deposit.

Source Deposit account is automatically created.

Target Virtual account must have related Ramp account assigned.

To create Deposit you must provide target Virtual account address or alias.

echo 'Create deposit account'

curl --location --request POST 'https://api.orangepill.cloud/v1/apps/deposit \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933dffabb' \
--header 'Content-Type: application/json' \
--data-raw '{
    "destination": {
        "account": "6340be52dffbdb56217f6a7b"
    },
    "asset": "BTC",    
    "seal": {
        "my_signature_field": "my_signature_value"
    },
    "data": {
        "description": "Desposit account for John James"
    }
}'

In response we get new deposit with status PENDING if validation was succesful. Notice that Deposit account is automatically created for source.

{
    "id": "639d2416cd7325b35f409452",
    "source": {
        "account": "634b56217f6a7b0be52dffbd",
        "deposit_address": "bc1q7pna7w7462uruh8m54tcnzspva8xd98wmc546u",
        "owner": "639675ab191e9023f356dfa6"
    },
    "destination": {
        "account": "6340be52dffbdb56217f6a7b",
        "owner": "639675ab191e9023f356dfa6"
    },
    "asset": "BTC",
    "data": {
        "description": "Desposit account for John James"
    },
    "owner": "639675ab191e9023f356dfa6",
    "created_at": 1671242774572,
    "status": "PENDING",
    "error": null
}

Deposit status

Status
Description

PENDING

Awaiting for first deposit.

PROCESSING

Deposit received, withdrawal and forwarding in process.

DONE

Deposit processing was successful.

FAILED

Deposit creation or processing has failed.

You can use the same Deposit App to receive multiple deposits. If the Deposit was in status DONE, it will change status to PROCESSING upon receiving of new deposit.

List deposits

You can apply filters to get list of deposits.

echo 'list deposits with status PENDING'

curl --location --request GET 'https://api.orangepill.cloud/v1/apps/deposit?query={"status":"PENDING"}' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'

In response we get array of payment objects.

[{
    "id": "639d2416cd7325b35f409452",
    "source": {
        "account": "634b56217f6a7b0be52dffbd",
        "deposit_address": "bc1q7pna7w7462uruh8m54tcnzspva8xd98wmc546u",
        "owner": "639675ab191e9023f356dfa6"
    },
    "destination": {
        "account": "6340be52dffbdb56217f6a7b",
        "owner": "639675ab191e9023f356dfa6"
    },
    "asset": "BTC",
    "data": {
        "description": "Desposit account for John James"
    },
    "owner": "639675ab191e9023f356dfa6",
    "created_at": 1671242774572,
    "status": "PENDING",
    "error": null
}]