Order lifecycle and Webhooks

The Offramp transaction lifecycle consists of the following steps:

Crypto Deposit:

  1. Completed (there is no failed state, as failed deposits do not appear in our database)

Sell

  1. Initiated (Created)
  2. Processing (Outgoing Payment Processing)
  3. Completed
  4. Failed

Webhooks

The merchant can recieve the following webhooks if a webhook URL is configured.

1. Crypto Deposit Successful

{
    "transaction_type": "DEPOSIT",
    "status": "COMPLETED",
    "crypto_symbol": "USDT",
    "network": "BSC",
    "amount": "10.00000000",
    "created_at": 1675171122000,
    "tag": "",
    "updated_at": 1675171203000,
    "usd_value": "10.00",
    "txn_hash": "Internal transfer 127897710444",
    "id": "91994108-9eff-4999-8e8f-238df8bd4961",
    "event": "deposit",
    "address": "0x94f30b2a43ec890848c64ecdbb434ea1bcc4b798",
    "user_id": "3faced19-20c7-48b8-952b-6143c8c198d2"
}

2. Sell Completed

{
  "event" : "SELL",
  "user_id": "77c4562e-ce47-4054-9d4e-4df69ca11a11", 
  "client_id": "3a309275-5936-4c79-8375-0ebb897502f0",
  "transaction_status": "COMPLETED", 
  "invested_at": "2022-11-16T09:30:13", 
  "transaction_id": "4f4d9561-b12f-4cdd-9726-d29333892fc9", 
  "transfer_type": "bank_transfer", 
  "bank_reference_id": "1176073620125", 
  "usd_amount": "1.21000000", 
  "fiat_amount": "100.00000000"
}

3. Crypto Withdraw Successful

{
    "transaction_type": "WITHDRAW",
    "status": "COMPLETED",
    "crypto_symbol": "USDT",
    "network": "BSC",
    "amount": "10.00000000",
    "created_at": 1675171122000,
    "tag": "",
    "updated_at": 1675171203000,
    "usd_value": "10.00",
    "txn_hash": "Internal transfer 127897710444",
    "id": "91994108-9eff-4999-8e8f-238df8bd4961",
    "event": "withdraw",
    "address": "0x94f30b2a43ec890848c64ecdbb434ea1bcc4b798",
    "user_id": "3faced19-20c7-48b8-952b-6143c8c198d2"
}