Skip to main content
POST
/
deposit-addresses
Create a Deposit Address
curl --request POST \
  --url https://sandbox-api.polygon.technology/v0.10/deposit-addresses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customerId": "<string>",
  "destination": {
    "details": {
      "accountHolder": "customer",
      "asset": "usd",
      "id": "<string>"
    },
    "type": "bankUs",
    "amount": "<string>"
  },
  "expectedSourceAsset": "<string>",
  "expectedSourceNetwork": "<string>",
  "label": "<string>",
  "metadata": {},
  "sponsorGas": true
}
'
import requests

url = "https://sandbox-api.polygon.technology/v0.10/deposit-addresses"

payload = {
"customerId": "<string>",
"destination": {
"details": {
"accountHolder": "customer",
"asset": "usd",
"id": "<string>"
},
"type": "bankUs",
"amount": "<string>"
},
"expectedSourceAsset": "<string>",
"expectedSourceNetwork": "<string>",
"label": "<string>",
"metadata": {},
"sponsorGas": True
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: '<string>',
destination: {
details: {accountHolder: 'customer', asset: 'usd', id: '<string>'},
type: 'bankUs',
amount: '<string>'
},
expectedSourceAsset: '<string>',
expectedSourceNetwork: '<string>',
label: '<string>',
metadata: {},
sponsorGas: true
})
};

fetch('https://sandbox-api.polygon.technology/v0.10/deposit-addresses', 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://sandbox-api.polygon.technology/v0.10/deposit-addresses",
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([
'customerId' => '<string>',
'destination' => [
'details' => [
'accountHolder' => 'customer',
'asset' => 'usd',
'id' => '<string>'
],
'type' => 'bankUs',
'amount' => '<string>'
],
'expectedSourceAsset' => '<string>',
'expectedSourceNetwork' => '<string>',
'label' => '<string>',
'metadata' => [

],
'sponsorGas' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);

$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://sandbox-api.polygon.technology/v0.10/deposit-addresses"

payload := strings.NewReader("{\n \"customerId\": \"<string>\",\n \"destination\": {\n \"details\": {\n \"accountHolder\": \"customer\",\n \"asset\": \"usd\",\n \"id\": \"<string>\"\n },\n \"type\": \"bankUs\",\n \"amount\": \"<string>\"\n },\n \"expectedSourceAsset\": \"<string>\",\n \"expectedSourceNetwork\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"sponsorGas\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://sandbox-api.polygon.technology/v0.10/deposit-addresses")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"<string>\",\n \"destination\": {\n \"details\": {\n \"accountHolder\": \"customer\",\n \"asset\": \"usd\",\n \"id\": \"<string>\"\n },\n \"type\": \"bankUs\",\n \"amount\": \"<string>\"\n },\n \"expectedSourceAsset\": \"<string>\",\n \"expectedSourceNetwork\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"sponsorGas\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.polygon.technology/v0.10/deposit-addresses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"<string>\",\n \"destination\": {\n \"details\": {\n \"accountHolder\": \"customer\",\n \"asset\": \"usd\",\n \"id\": \"<string>\"\n },\n \"type\": \"bankUs\",\n \"amount\": \"<string>\"\n },\n \"expectedSourceAsset\": \"<string>\",\n \"expectedSourceNetwork\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"sponsorGas\": true\n}"

response = http.request(request)
puts response.read_body
{
  "createdAt": "2023-11-07T05:31:56Z",
  "customerId": "<string>",
  "depositInstructions": {
    "address": "<string>",
    "asset": "<string>",
    "network": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z"
  },
  "destination": {
    "category": "crypto",
    "details": {
      "asset": "<string>",
      "blockchainAddress": "<string>",
      "blockchainAsset": {
        "chainId": "<string>",
        "tokenId": "<string>"
      },
      "id": "<string>",
      "network": "<string>",
      "txHash": "<string>"
    },
    "type": "walletOms",
    "party": {
      "customerId": "<string>",
      "relationship": "customer"
    },
    "payoutOrigin": {
      "details": {
        "accountHolder": "customer",
        "accountHolderName": "<string>",
        "accountNumber": "<string>",
        "routingNumber": "<string>",
        "virtualAccountId": "<string>"
      },
      "type": "bank"
    }
  },
  "expectedSourceAsset": "<string>",
  "expectedSourceNetwork": "<string>",
  "id": "<string>",
  "label": "<string>",
  "metadata": {},
  "object": "depositAddress",
  "statusReason": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Headers

Idempotency-Key
string
required

Required on POST and PUT requests. Use a unique value per logical mutation attempt, for example a UUID.

Body

application/json
customerId
string
required

Owning customer (cus_… or legacy public id).

destination
object
required

Side-shaped destination: a registered bankUs, bankIban, or bankCanada External Account. The server validates details (asset/network/accountHolder) against the resolved external account.

expectedSourceAsset
string
required

Asset of the inbound crypto the deposit address expects. "usdc" | "usdt" (lowercase).

expectedSourceNetwork
string
required

Network of the inbound crypto the deposit address expects. Drawn from the served-network set; excludes polygon, ink, and sui.

label
string

Partner display label.

metadata
object
sponsorGas
boolean
default:true

When true, OMS absorbs the on-chain gas cost for the destination delivery. Only true is currently supported.

Response

201 - application/json

The request has succeeded and a new resource has been created as a result.

createdAt
string<date-time>
customerId
string

Public customer id (cst_...). Named customerId to match VA's naming convention.

depositInstructions
object

Null in the 201 until provisioning populates the OMS-owned inlet address. Top-level mirror of the virtual account's bankDetails.

destination
object

Unified destination shape (payoutOrigin lives inside TransactionDestination).

expectedSourceAsset
string

Asset of the inbound crypto the DA expects.

expectedSourceNetwork
string

Network of the inbound crypto the DA expects.

failureReason
enum<string>

v2: closed enum carried on DA when status = "failed". camelCase per partner channel naming convention.

Available options:
provisioningTimeout,
systemError,
ereborRejected,
intlBankAccountCreateRejected,
noMatchingNetwork,
blockchainAddressInUse,
bankAccountInUse
id
string
label
string
metadata
object
object
enum<string>
Available options:
depositAddress
status
enum<string>
Available options:
pending,
active,
frozen,
closed,
failed,
inactiveActionRequired
statusReason
string
transactionType
enum<string>

Always TransferType.cryptoToFiat for DA. Reuses the existing TransferType enum (instead of a string literal) to avoid collision-driven renames on the generated oapi enums - see feedback_reuse_enums_over_collision memory.

Available options:
cryptoToCrypto,
fiatToCrypto,
cryptoToFiat
updatedAt
string<date-time>