POST
/
transactions
/
v2
/
offramp
/
initiate
Initiate an offramp transaction
curl --request POST \
  --url https://external.dev.onboardpay.co/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": "<string>"
}'
{
  "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,
    "usdAmount": 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>"
  },
  "isNoKyc": true,
  "paymentReceiptUploadId": "null"
}
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<uuid>
paymentMethodId
string
buyerPaymentMethodId
string
customerWallet
object
apiKey
string
thirdPartyOrderTradeId
string
cexOrderId
string

Response

Success

id
string<uuid>
required
reference
string
required
Example:

"0165359005113074501885"

customerId
string<uuid>
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
Example:

"John Doe"

offer
object
escrowAddress
string

Escrow address

Example:

1.2869144918162796e+48

paymentChannelId
string
Example:

"BANK_TRANSFER_NIGERIA"

paymentMethod
object
buyerPaymentMethod
object
customerWallet
object
tokenAddress
string
Example:

0

createdAt
string<date-time>
initiatedAt
string<date-time>
depositedAt
string<date-time>
confirmedAt
string<date-time>
completedAt
string<date-time>
cancelledAt
string<date-time>
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
Example:

3

isCexOrder
boolean
Example:

false

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
isNoKyc
boolean

Flag showing if order is a no kyc order

paymentReceiptUploadId
string
default:null

Upload ID for receipt uploaded on storage bucket