POST
/
transactions
/
v2
/
offramp
/
initiate
curl --request POST \
  --url https://onboard-external-dev.api.nestcoin.io/transactions/v2/offramp/initiate \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --data '{
  "offerId": "<string>",
  "offerToken": "<string>",
  "unitAmount": "<string>",
  "rate": 123,
  "fiatAmount": 123,
  "tradeRequestBroadcastId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentMethodId": "<string>",
  "buyerPaymentMethodId": "<string>",
  "customerWallet": {
    "walletAddress": 0,
    "networkId": "bsc_testnet",
    "walletName": "My Trust Wallet"
  },
  "apiKey": "<string>",
  "thirdPartyOrderTradeId": "<string>",
  "cexOrderId": 1
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "reference": "0165359005113074501885",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customerName": "John Doe",
  "offer": {
    "offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "partnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "transactionType": "ONRAMP",
    "rate": 0.32,
    "networkId": "TRC20",
    "fiatSymbol": "NGN",
    "fiatAmount": 120.5,
    "token": "USDT",
    "tokenAmount": 120.5,
    "partnerDisplayName": "John Doe",
    "adNote": "Guaranteed fast payment",
    "instantPayEnabled": true,
    "instantPayPaymentAccountId": "<string>",
    "tradeMode": "P2P"
  },
  "escrowAddress": 1.2869144918162796e+48,
  "paymentChannelId": "BANK_TRANSFER_NIGERIA",
  "paymentMethod": {},
  "buyerPaymentMethod": {},
  "customerWallet": {
    "walletAddress": 0,
    "networkId": "bsc_testnet",
    "walletName": "My Trust Wallet"
  },
  "tokenAddress": 0,
  "status": "INITIATED",
  "createdAt": "2023-11-07T05:31:56Z",
  "initiatedAt": "2023-11-07T05:31:56Z",
  "depositedAt": "2023-11-07T05:31:56Z",
  "confirmedAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z",
  "cancelledAt": "2023-11-07T05:31:56Z",
  "cancellationReason": "<string>",
  "disputeId": "null",
  "timeout": {
    "name": "APPROVE_TRANSACTION",
    "startTime": "2023-11-07T05:31:56Z",
    "duration": 123,
    "timeLeft": 123
  },
  "lockHash": "null",
  "confirmationHash": "null",
  "cancellationHash": "null",
  "isPartnerAcknowledged": false,
  "defaultingParty": "CUSTOMER",
  "rating": 3,
  "isCexOrder": false,
  "fee": {
    "asToken": "1000.0",
    "asFiat": 123
  },
  "instantPayProcessingStatus": "PENDING_IP_REPORT",
  "tradeValue": 123,
  "merchantTokenValue": 123,
  "customerTokenValue": 123,
  "payableAmount": 123,
  "thirdpartyOrderInfo": {
    "businessId": "<string>",
    "tradeId": "<string>",
    "product": "<string>",
    "blockchainOrderId": 123,
    "externalOrderReference": "<string>"
  }
}

Initiates a crypto sale (offramp) order on Onboard directly via the API.

Ideal for dApps integrating Onboard Connect natively, removing the need to redirect to a browser or webview.

Authorizations

x-auth-token
string
header
required

Body

application/json
offerId
string
required

id of offer to make unit reservation from

unitAmount
string
required

unit to be reserved

rate
number
required

rate to make reservation at

offerToken
string

Token used to access private ads.

fiatAmount
number

fiat equivalent of reserved unit

tradeRequestBroadcastId
string
paymentMethodId
string
buyerPaymentMethodId
string
customerWallet
object
apiKey
string
thirdPartyOrderTradeId
string
cexOrderId
integer
Required range: x >= 0

Response

201
application/json
Success
id
string
required
reference
string
required
customerId
string
required
status
enum<string>
required

Order transaction status

Available options:
INITIATED,
DEPOSITED,
CONFIRMED,
COMPLETED,
PENDING,
CANCELLED,
IN_DISPUTE,
AWAITING_ACCEPTANCE
fee
object
required
customerName
string
offer
object
escrowAddress
string

Escrow address

paymentChannelId
string
paymentMethod
object
buyerPaymentMethod
object
customerWallet
object
tokenAddress
string
createdAt
string
initiatedAt
string
depositedAt
string
confirmedAt
string
completedAt
string
cancelledAt
string
cancellationReason
string
disputeId
string
default:
null
timeout
object
lockHash
string
default:
null
confirmationHash
string
default:
null
cancellationHash
string
default:
null
isPartnerAcknowledged
boolean
default:
false
defaultingParty
enum<string>

Type of user/role of user in transaction

Available options:
CUSTOMER,
PARTNER
rating
number
isCexOrder
boolean
instantPayProcessingStatus
enum<string>
Available options:
PENDING_IP_REPORT,
IN_PROGRESS,
FAILURE,
SUCCESS
tradeValue
number
deprecated

Actual token amount that is to be traded

merchantTokenValue
number

Actual token value that is to be traded by merchant less any fees

customerTokenValue
number

Actual token value that is to be traded by customer less any fees

payableAmount
number

Actual fiat amount that is to be paid.

thirdpartyOrderInfo
object