Skip to main content
POST
/
transactions
Execute a transaction (send)
curl --request POST \
  --url https://sandbox-api.polygon.technology/v0.10/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "quoteId": "<string>",
  "deviceFingerprint": "<string>",
  "externalAccountId": "<string>",
  "metadata": {},
  "partnerTransactionId": 123,
  "paymentMethodId": "<string>",
  "sourceWalletAddress": "<string>",
  "tags": "<string>",
  "webSessionId": "<string>"
}
'
import requests

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

payload = {
"quoteId": "<string>",
"deviceFingerprint": "<string>",
"externalAccountId": "<string>",
"metadata": {},
"partnerTransactionId": 123,
"paymentMethodId": "<string>",
"sourceWalletAddress": "<string>",
"tags": "<string>",
"webSessionId": "<string>"
}
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({
quoteId: '<string>',
deviceFingerprint: '<string>',
externalAccountId: '<string>',
metadata: {},
partnerTransactionId: 123,
paymentMethodId: '<string>',
sourceWalletAddress: '<string>',
tags: '<string>',
webSessionId: '<string>'
})
};

fetch('https://sandbox-api.polygon.technology/v0.10/transactions', 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/transactions",
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([
'quoteId' => '<string>',
'deviceFingerprint' => '<string>',
'externalAccountId' => '<string>',
'metadata' => [

],
'partnerTransactionId' => 123,
'paymentMethodId' => '<string>',
'sourceWalletAddress' => '<string>',
'tags' => '<string>',
'webSessionId' => '<string>'
]),
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/transactions"

payload := strings.NewReader("{\n \"quoteId\": \"<string>\",\n \"deviceFingerprint\": \"<string>\",\n \"externalAccountId\": \"<string>\",\n \"metadata\": {},\n \"partnerTransactionId\": 123,\n \"paymentMethodId\": \"<string>\",\n \"sourceWalletAddress\": \"<string>\",\n \"tags\": \"<string>\",\n \"webSessionId\": \"<string>\"\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/transactions")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"<string>\",\n \"deviceFingerprint\": \"<string>\",\n \"externalAccountId\": \"<string>\",\n \"metadata\": {},\n \"partnerTransactionId\": 123,\n \"paymentMethodId\": \"<string>\",\n \"sourceWalletAddress\": \"<string>\",\n \"tags\": \"<string>\",\n \"webSessionId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"quoteId\": \"<string>\",\n \"deviceFingerprint\": \"<string>\",\n \"externalAccountId\": \"<string>\",\n \"metadata\": {},\n \"partnerTransactionId\": 123,\n \"paymentMethodId\": \"<string>\",\n \"sourceWalletAddress\": \"<string>\",\n \"tags\": \"<string>\",\n \"webSessionId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "customerId": "<string>",
  "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"
    }
  },
  "id": "<string>",
  "object": "transaction",
  "pricing": {
    "destination": {
      "amountGross": "<string>",
      "amountNet": "<string>",
      "asset": "<string>",
      "feesDeducted": {
        "developer": "<string>",
        "gas": "<string>",
        "oms": "<string>",
        "total": "<string>"
      }
    },
    "effectiveRate": "<string>",
    "exchangeRate": "<string>",
    "pair": "<string>",
    "source": {
      "amountGross": "<string>",
      "amountNet": "<string>",
      "asset": "<string>",
      "feesDeducted": {
        "developer": "<string>",
        "gas": "<string>",
        "oms": "<string>",
        "total": "<string>"
      }
    },
    "sponsorGas": true,
    "sponsorGasCost": "<string>"
  },
  "source": {
    "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"
    }
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "error": {
    "code": "<string>",
    "message": "<string>",
    "occurredAt": "2023-11-07T05:31:56Z",
    "recoverable": true,
    "recovery": {
      "instructions": "<string>",
      "referenceFields": {
        "sourceTxHash": "<string>",
        "transactionId": "<string>"
      },
      "type": "operatorRecovery"
    },
    "refund": {
      "amount": "<string>",
      "asset": "<string>",
      "destinationWallet": "<string>",
      "network": "<string>",
      "txHash": "<string>"
    }
  },
  "estimatedArrival": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "hold": {
    "type": "senderAttribution",
    "deadline": "2023-11-07T05:31:56Z",
    "matchableExternalAccountCriteria": {
      "blockchainAddress": "<string>",
      "customerId": "<string>",
      "networkFamily": "<string>",
      "type": "walletExternal"
    },
    "required": true,
    "resolvedAt": "2023-11-07T05:31:56Z",
    "since": "2023-11-07T05:31:56Z",
    "txHash": "<string>"
  },
  "metadata": {},
  "precursor": {
    "details": {
      "depositAddressId": "<string>",
      "depositInstructions": {
        "address": "<string>",
        "asset": "<string>",
        "network": "<string>",
        "expiresAt": "2023-11-07T05:31:56Z"
      }
    },
    "type": "depositAddress"
  },
  "projectId": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"customerId": "<string>",
"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"
}
},
"id": "<string>",
"object": "transaction",
"pricing": {
"destination": {
"amountGross": "<string>",
"amountNet": "<string>",
"asset": "<string>",
"feesDeducted": {
"developer": "<string>",
"gas": "<string>",
"oms": "<string>",
"total": "<string>"
}
},
"effectiveRate": "<string>",
"exchangeRate": "<string>",
"pair": "<string>",
"source": {
"amountGross": "<string>",
"amountNet": "<string>",
"asset": "<string>",
"feesDeducted": {
"developer": "<string>",
"gas": "<string>",
"oms": "<string>",
"total": "<string>"
}
},
"sponsorGas": true,
"sponsorGasCost": "<string>"
},
"source": {
"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"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"recoverable": true,
"recovery": {
"instructions": "<string>",
"referenceFields": {
"sourceTxHash": "<string>",
"transactionId": "<string>"
},
"type": "operatorRecovery"
},
"refund": {
"amount": "<string>",
"asset": "<string>",
"destinationWallet": "<string>",
"network": "<string>",
"txHash": "<string>"
}
},
"estimatedArrival": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"hold": {
"type": "senderAttribution",
"deadline": "2023-11-07T05:31:56Z",
"matchableExternalAccountCriteria": {
"blockchainAddress": "<string>",
"customerId": "<string>",
"networkFamily": "<string>",
"type": "walletExternal"
},
"required": true,
"resolvedAt": "2023-11-07T05:31:56Z",
"since": "2023-11-07T05:31:56Z",
"txHash": "<string>"
},
"metadata": {},
"precursor": {
"details": {
"depositAddressId": "<string>",
"depositInstructions": {
"address": "<string>",
"asset": "<string>",
"network": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
},
"type": "depositAddress"
},
"projectId": "<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

Request body for executing a transaction. References the quote to accept; the remaining fields are optional routing hints and metadata.

quoteId
string
required
deviceFingerprint
string
externalAccountId
string

External-account id of the debit card funding (buy) or receiving (sell) this transaction. OMS resolves it to the underlying card provider identifier.

externalCustodyCreditInfo
object

Destination details for crediting funds to a wallet held in external custody.

metadata
object
partnerTransactionId
integer<int32>
paymentMethodId
string

Deprecated for cards: raw card-provider payment method id. Use externalAccountId instead.

sourceWalletAddress
string
tags
string
webSessionId
string

Response

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

A single movement of money from a source to a destination. Created by accepting a quote, or generated automatically by a deposit address, virtual account, or cash-in. Track its progress with status.

customerId
string
required

The owning (sender) customer. OMSX customer TypeID (cst_…).

destination
object
required

The destination side of a transaction or quote: a typed instrument plus payoutOrigin. Amounts live only in pricing.

id
string
required
object
enum<string>
required
Available options:
transaction
pricing
object
required

Consolidated economics.

source
object
required

OMS-custodied crypto wallet instrument.

status
enum<string>
required

Lifecycle of a transaction. processing: funds in motion. awaitingAction: non-terminal, blocked on developer/upstream/compliance (see hold); returns to processing once cleared. completed: delivered. failed: terminal failure.

Available options:
processing,
awaitingAction,
completed,
failed
createdAt
string<date-time>
error
object

Details of an asynchronous settlement failure on a transaction (e.g. a downstream payout that failed after the initial request succeeded). Present only once a failure has occurred.

estimatedArrival
string<date-time>
expiresAt
string<date-time>
hold
object

Present while status is awaitingAction; explains the hold and deadline to resolve it.

metadata
object
precursor
object

What created this transaction, carrying that origin's deposit instructions.

projectId
string

The owning project. Populated only on cross-project operator endpoints; omitted on partner endpoints, where the project is implicit from the auth token.

sourceToDestination
enum<string>

Composite of source and destination instrument categories, inferred from each side. Replaces the older TransferType. The cash corridors (cryptoToCash, cashToCrypto) are derived from a cash-pickup destination or cash-in source respectively; the rest map straight from the internal corridor type.

Available options:
cryptoToCrypto,
cryptoToCash,
cryptoToFiatAccount,
cashToCrypto,
fiatAccountToCrypto
subStatus
enum<string>

Finer-grained, status-scoped sub-state of a transaction. Each member is namespaced by its parent status (e.g. processing.cashPickupReady). The closed set; absent when the transaction has no meaningful sub-state.

Available options:
processing.fundsPulled,
processing.cashPickupReady,
processing.underReview,
completed.cashPickupCollected,
completed.cashPickupExpired,
awaitingAction.awaitingSenderAttribution,
awaitingAction.depositAddressFrozen,
awaitingAction.depositAddressInactive,
failed.attributionTimeout,
failed.depositAddressFrozenTimeout,
failed.depositAddressInactiveTimeout,
failed.depositAddressClosed,
processing.awaitingCryptoOut,
processing.cryptoOut,
processing.awaitingFiatOut,
processing.fiatOut
updatedAt
string<date-time>