Ramps & FX
14 min
use this workflow for on ramps, off ramps, and foreign exchange transactions where primevault must price and select a route before creating the transaction the public workflow is quote based provide the source and destination criteria, compare the returned quotes, persist the selected quoteid , and execute that quote some routes also return deposit instructions that must be completed before settlement can continue workflow request available quotes select and persist a quoteid execute the selected quote if the transaction returns deposit instructions, complete the deposit and mark it done retrieve the transaction to track its final status get quotes and execute a selected route use the quote workflow for on ramps, off ramps, and foreign exchange transactions first request quotes, then execute the selected quoteid the sdk calls the underlying request an intent ; that implementation term therefore remains in the request type and method names below step 1 — get quotes post /api/external/transactions/quote/ rest request body { "intent" { "source" { "type" "vault", "id" "vault 123", "suborgid" "sub org 123" }, "destination" { "type" "bank account", "id" "bank account 456" }, "routeaccounts" \[ { "provider" "provider key", "id" "provider linked vault 123" } ], "fromasset" "usdc", "fromamount" "100 00", "fromchain" "ethereum", "frompaymentrail" "blockchain", "toasset" "usd", "topaymentrail" "us ach" }, } field type required description intent transactionintentrequest yes quote criteria for the requested ramp or fx transaction intent source transferpartydata no source party when the route requires it intent destination transferpartydata no destination party when the route requires it intent routeaccounts { provider string; id string }\[] no explicit provider linked accounts used for quote routing fromasset / toasset string route dependent source and destination assets fromamount / toamount string route dependent quote one side provide the amount you are fixing and omit the other side unless the route explicitly supports both fromchain / tochain string no blockchain identifiers for crypto legs frompaymentrail / topaymentrail string no payment rail identifiers for fiat or provider legs response { "quotes" \[ { "quoteid" "quote 123", "rate" "0 9900", "fees" { "amount" "1 00", "asset" "usdc", "amountinfiat" "1 00" }, "finalfromamount" "100 00", "finaltoamount" "99 00", "sourcename" "provider name" } ] } javascript sdk interface getquoterequest { intent transactionintentrequest; } interface quoteresponse { quotes quoteresponseitem\[]; } getquote(request getquoterequest) promise\<quoteresponse> the sdk serializes omitted fields inside intent as null it includes routeaccounts only when you provide them step 2 — execute the selected quote post /api/external/transactions/intent/create/ rest request body { "intent" null, "quoteid" "quote 123", "externalid" "settlement 1001", "memo" "usdc to usd settlement", } for a quote based execution, persist and send the selected quoteid the sdk allows an optional intent for supported direct intent flows, but quote execution does not require repeating the full quote request response quote driven fiat deposits may also include depositinstructions { "id" "transaction intent 123", "orgid" "org 456", "vaultid" "vault 123", "status" "pending", "transactiontype" "outgoing", "category" "off ramp", "subcategory" "off ramp", "createdat" "2026 08 04t11 10 00z", "updatedat" "2026 08 04t11 10 00z", "isdeleted" false, "externalid" "settlement 1001", "memo" "usdc to usd settlement", "intent" { "source" { "type" "vault", "id" "vault 123", "suborgid" "sub org 123" }, "destination" { "type" "bank account", "id" "bank account 456" }, "fromasset" "usdc", "fromamount" "100 00", "fromchain" "ethereum", "frompaymentrail" "blockchain", "toasset" "usd", "topaymentrail" "us ach" }, "quoteresponse" { "quoteid" "quote 123", "rate" "0 9900", "fees" { "amount" "1 00", "asset" "usdc", "amountinfiat" "1 00" }, "finalfromamount" "100 00", "finaltoamount" "99 00", "sourcename" "provider name" }, "depositinstructions" { "type" "bank account", "paymentrail" "us ach", "bankdetails" { "bankname" "settlement bank", "beneficiaryname" "primevault settlement", "accountnumbermasked" " 4321", "routingnumber" "021000021" }, "asset" "usd" }, "amount" "100 00" } javascript sdk interface transactionexecuteintentrequest { intent? transactionintentrequest | null; quoteid? string | null; externalid? string; memo? string; } createtransactionfromintent( request transactionexecuteintentrequest, ) promise\<transaction> if execution returns a pending transaction, the sdk signs and submits the associated change approval and then retrieves the updated transaction route account selection belongs to the quote request; the execute serializer does not resend routeaccounts mark a settlement deposit complete post /api/external/transactions/mark deposit done/ rest request body { "transactionid" "transaction 123" } this endpoint is only valid for an approved transfer whose subcategory is deposit and which belongs to a quote driven ramp or fx settlement flow it is not a general transaction completion endpoint response { "id" "transaction deposit 123", "orgid" "org 456", "vaultid" "vault 123", "status" "submitted", "transactiontype" "incoming", "category" "transfer", "subcategory" "deposit", "createdat" "2026 08 04t11 20 00z", "updatedat" "2026 08 04t11 22 00z", "isdeleted" false, "source" { "type" "bank account", "id" "bank account 456", "paymentrail" "us ach" }, "destination" { "type" "vault", "id" "vault 123", "suborgid" "sub org 123" }, "asset" "usd", "amount" "100 00" } javascript sdk markdepositdone(transactionid string) promise\<transaction>