Create a payout
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>"
},
"developer_fee_percent": "1.5"
}
'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 \"developer_fee_percent\": \"1.5\"\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>'},
developer_fee_percent: '1.5'
})
};
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>'
],
'developer_fee_percent' => '1.5'
]),
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 \"developer_fee_percent\": \"1.5\"\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>",
"payment_rail": "ach"
},
"developer_fee_percent": "1.5",
"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": {
"value": "100.00",
"currency": "usd"
},
"gas_credits_charged_usd": "<string>"
}
]
}Fiat
Create a payout
Create a payout from a wallet that lands as a fiat currency in a destination bank account.
POST
/
v1
/
wallets
/
{wallet_id}
/
payout
/
fiat
Create a payout
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>"
},
"developer_fee_percent": "1.5"
}
'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 \"developer_fee_percent\": \"1.5\"\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>'},
developer_fee_percent: '1.5'
})
};
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>'
],
'developer_fee_percent' => '1.5'
]),
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 \"developer_fee_percent\": \"1.5\"\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>",
"payment_rail": "ach"
},
"developer_fee_percent": "1.5",
"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": {
"value": "100.00",
"currency": "usd"
},
"gas_credits_charged_usd": "<string>"
}
]
}Authorizations
Headers
Body
application/json
Request body for initiating a payout (crypto to fiat offramp) from a wallet.
Response
200 - application/json
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.
steps
(EVMTransactionWalletActionStep · object | EVMUserOperationWalletActionStep · object | SVMTransactionWalletActionStep · object | TVMTransactionWalletActionStep · object | ExternalTransactionWalletActionStep · object | CustodianTransactionWalletActionStep · object | TempoZoneSettlementWalletActionStep · object | WisdomTreeSettlementWalletActionStep · object)[]
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
- TempoZoneSettlementWalletActionStep
- WisdomTreeSettlementWalletActionStep
Show child attributes
Show child attributes
Was this page helpful?

