curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"source": {
"asset": "<string>",
"chain": "<string>",
"amount": "<string>"
},
"destination": {
"fiat_account_id": "<string>"
}
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"asset\": \"<string>\",\n \"chain\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"destination\": {\n \"fiat_account_id\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
source: {asset: '<string>', chain: '<string>', amount: '<string>'},
destination: {fiat_account_id: '<string>'}
})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat', 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://api.privy.io/v1/wallets/{wallet_id}/payout/fiat",
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([
'source' => [
'asset' => '<string>',
'chain' => '<string>',
'amount' => '<string>'
],
'destination' => [
'fiat_account_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$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://api.privy.io/v1/wallets/{wallet_id}/payout/fiat"
payload := strings.NewReader("{\n \"source\": {\n \"asset\": \"<string>\",\n \"chain\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"destination\": {\n \"fiat_account_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"id": "<string>",
"status": "pending",
"wallet_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"type": "payout",
"provider": "bridge",
"environment": "sandbox",
"source": {
"asset": "<string>",
"chain": "<string>",
"amount": "<string>"
},
"destination": {
"fiat_account_id": "<string>"
},
"reference_id": "<string>",
"failure_reason": {
"message": "<string>",
"details": "<unknown>"
},
"steps": [
{
"type": "evm_transaction",
"status": "preparing",
"caip2": "<string>",
"transaction_hash": "<string>",
"failure_reason": {
"message": "<string>",
"details": "<unknown>"
},
"finalized": true,
"gas_credits_charged_usd": "<string>"
}
]
}Create a payout
Create a payout from a wallet that lands as a fiat currency in a destination bank account.
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"source": {
"asset": "<string>",
"chain": "<string>",
"amount": "<string>"
},
"destination": {
"fiat_account_id": "<string>"
}
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"asset\": \"<string>\",\n \"chain\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"destination\": {\n \"fiat_account_id\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
source: {asset: '<string>', chain: '<string>', amount: '<string>'},
destination: {fiat_account_id: '<string>'}
})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/payout/fiat', 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://api.privy.io/v1/wallets/{wallet_id}/payout/fiat",
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([
'source' => [
'asset' => '<string>',
'chain' => '<string>',
'amount' => '<string>'
],
'destination' => [
'fiat_account_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$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://api.privy.io/v1/wallets/{wallet_id}/payout/fiat"
payload := strings.NewReader("{\n \"source\": {\n \"asset\": \"<string>\",\n \"chain\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"destination\": {\n \"fiat_account_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"id": "<string>",
"status": "pending",
"wallet_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"type": "payout",
"provider": "bridge",
"environment": "sandbox",
"source": {
"asset": "<string>",
"chain": "<string>",
"amount": "<string>"
},
"destination": {
"fiat_account_id": "<string>"
},
"reference_id": "<string>",
"failure_reason": {
"message": "<string>",
"details": "<unknown>"
},
"steps": [
{
"type": "evm_transaction",
"status": "preparing",
"caip2": "<string>",
"transaction_hash": "<string>",
"failure_reason": {
"message": "<string>",
"details": "<unknown>"
},
"finalized": true,
"gas_credits_charged_usd": "<string>"
}
]
}Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.
Idempotency keys ensure API requests are executed only once within a 24-hour window.
Path Parameters
The ID of the wallet.
Body
Response
The created payout wallet action.
A payout wallet action. Crypto is sent on-chain to a liquidation address that offramps to the destination bank account.
The ID of the wallet action.
The current status of the wallet action.
pending, succeeded, rejected, failed The ID of the wallet involved in the action.
ISO 8601 timestamp of when the wallet action was created.
payout Supported fiat orchestration providers.
bridge The Privy API environment.
sandbox, production "sandbox"
The source crypto asset, chain, and amount for a payout.
Show child attributes
Show child attributes
The destination bank account for a payout.
Show child attributes
Show child attributes
Developer-provided reference ID, if one was included in the request.
Top-level failure context for the wallet action. Present on rejected or failed actions when available.
Show child attributes
Show child attributes
The steps of the wallet action. Only returned if ?include=steps is provided.
A wallet action step consisting of an EVM transaction.
- EVMTransactionWalletActionStep
- EVMUserOperationWalletActionStep
- SVMTransactionWalletActionStep
- TVMTransactionWalletActionStep
- ExternalTransactionWalletActionStep
- CustodianTransactionWalletActionStep
Show child attributes
Show child attributes
Was this page helpful?

