curl --request POST \
--url https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "bank",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"idempotency_key": "<string>",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_reference": "<string>",
"proof_url": "<string>",
"transfer_date": "<string>",
"phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "application/pdf",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft"
payload = {
"method": "bank",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"idempotency_key": "<string>",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_reference": "<string>",
"proof_url": "<string>",
"transfer_date": "<string>",
"phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "application/pdf",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'bank',
fiat_amount: '<string>',
fiat_currency: '<string>',
idempotency_key: '<string>',
to_wallet_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_reference: '<string>',
proof_url: '<string>',
transfer_date: '<string>',
phone_number: '<string>',
sender_account_name: '<string>',
sender_account_number_last4: '<string>',
sender_bank_name: '<string>',
sender_bank_branch: '<string>',
receipt_number: '<string>',
receipt_uploaded_at: '2023-11-07T05:31:56Z',
proof_file_name: '<string>',
proof_mime_type: 'application/pdf',
proof_size_bytes: 123,
proof_file_sha256: '<string>',
requested_crypto_amount: '<string>',
pricing_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fx_rate_quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'bank',
'fiat_amount' => '<string>',
'fiat_currency' => '<string>',
'idempotency_key' => '<string>',
'to_wallet_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_reference' => '<string>',
'proof_url' => '<string>',
'transfer_date' => '<string>',
'phone_number' => '<string>',
'sender_account_name' => '<string>',
'sender_account_number_last4' => '<string>',
'sender_bank_name' => '<string>',
'sender_bank_branch' => '<string>',
'receipt_number' => '<string>',
'receipt_uploaded_at' => '2023-11-07T05:31:56Z',
'proof_file_name' => '<string>',
'proof_mime_type' => 'application/pdf',
'proof_size_bytes' => 123,
'proof_file_sha256' => '<string>',
'requested_crypto_amount' => '<string>',
'pricing_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fx_rate_quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft"
payload := strings.NewReader("{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"idempotent_replay": true
}{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Create OTC Deposit Draft (B2B Web, Tab 1)
Inserts a row in otc_deposits with status: draft (bank only on this path). Required: requested_asset (USDT or USDC) and requested_network (tron or ethereum).
Sets credited_to_address and to_wallet_id from the merchant default wallet on that network (master ledger user or sub-vendor), unless body to_wallet_id selects another wallet owned by the merchant ledger.
Merchant completes pricing on PATCH .../quote (updates the same otc_deposits row using pricing_profiles and fx_rate_quotes IDs), then submits on POST .../submit.
Optional Idempotency-Key header (or body idempotency_key, max 128 chars). Duplicate key returns 200 with idempotent_replay: true and backfills credited_to_address when missing.
curl --request POST \
--url https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "bank",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"idempotency_key": "<string>",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_reference": "<string>",
"proof_url": "<string>",
"transfer_date": "<string>",
"phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "application/pdf",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft"
payload = {
"method": "bank",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"idempotency_key": "<string>",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_reference": "<string>",
"proof_url": "<string>",
"transfer_date": "<string>",
"phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "application/pdf",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'bank',
fiat_amount: '<string>',
fiat_currency: '<string>',
idempotency_key: '<string>',
to_wallet_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_reference: '<string>',
proof_url: '<string>',
transfer_date: '<string>',
phone_number: '<string>',
sender_account_name: '<string>',
sender_account_number_last4: '<string>',
sender_bank_name: '<string>',
sender_bank_branch: '<string>',
receipt_number: '<string>',
receipt_uploaded_at: '2023-11-07T05:31:56Z',
proof_file_name: '<string>',
proof_mime_type: 'application/pdf',
proof_size_bytes: 123,
proof_file_sha256: '<string>',
requested_crypto_amount: '<string>',
pricing_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fx_rate_quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'bank',
'fiat_amount' => '<string>',
'fiat_currency' => '<string>',
'idempotency_key' => '<string>',
'to_wallet_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_reference' => '<string>',
'proof_url' => '<string>',
'transfer_date' => '<string>',
'phone_number' => '<string>',
'sender_account_name' => '<string>',
'sender_account_number_last4' => '<string>',
'sender_bank_name' => '<string>',
'sender_bank_branch' => '<string>',
'receipt_number' => '<string>',
'receipt_uploaded_at' => '2023-11-07T05:31:56Z',
'proof_file_name' => '<string>',
'proof_mime_type' => 'application/pdf',
'proof_size_bytes' => 123,
'proof_file_sha256' => '<string>',
'requested_crypto_amount' => '<string>',
'pricing_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fx_rate_quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft"
payload := strings.NewReader("{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/deposits/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"bank\",\n \"fiat_amount\": \"<string>\",\n \"fiat_currency\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"to_wallet_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_reference\": \"<string>\",\n \"proof_url\": \"<string>\",\n \"transfer_date\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sender_account_name\": \"<string>\",\n \"sender_account_number_last4\": \"<string>\",\n \"sender_bank_name\": \"<string>\",\n \"sender_bank_branch\": \"<string>\",\n \"receipt_number\": \"<string>\",\n \"receipt_uploaded_at\": \"2023-11-07T05:31:56Z\",\n \"proof_file_name\": \"<string>\",\n \"proof_mime_type\": \"application/pdf\",\n \"proof_size_bytes\": 123,\n \"proof_file_sha256\": \"<string>\",\n \"requested_crypto_amount\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"idempotent_replay": true
}{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
128Body
Bank-only draft (B2B Tab 1). Creates otc_deposits with credited_to_address populated from the merchant default wallet (or optional to_wallet_id).
bank Active three-letter ISO code in fiat_currencies. List via GET /api/v1/auth/fiat-currencies.
USDT, USDC tron, ethereum 128Optional wallet on requested_network owned by the master merchant or a sub-vendor under that merchant. When omitted, the default wallet for that network is used for credited_to_address.
Bank wire reference. Globally unique (case-insensitive) when set.
YYYY-MM-DD for bank
"application/pdf"