Skip to main content
POST
https://api.sandbox.wepayout.com.br
/
v2
/
payout
/
transfers
Create Transfer
curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_wallet_id": "<string>",
  "destination_wallet_id": "<string>",
  "amount": 123,
  "currency": "<string>",
  "description": "<string>",
  "external_id": "<string>"
}
'
{
  "id": 98765,
  "source_wallet_id": "wallet-uuid-source",
  "destination_wallet_id": "wallet-uuid-destination",
  "amount": 10000,
  "currency": "BRL",
  "description": "Transfer between accounts",
  "status": {
    "id": 1,
    "name": "Completed"
  },
  "external_id": "TRANSFER-001",
  "created_at": "2024-06-13T11:00:00.000000Z",
  "updated_at": "2024-06-13T11:00:00.000000Z"
}

Create Transfer

Create a transfer between wallets within the WEpayments platform.

Request Body

source_wallet_id
string
required
Source wallet UUID to transfer from.Example: wallet-uuid-source
destination_wallet_id
string
required
Destination wallet UUID to transfer to.Example: wallet-uuid-destination
amount
integer
required
Transfer amount in the smallest currency unit (e.g., 100 cents to transfer R$1.00).Min: 1, Max: 15000000
currency
string
required
Currency code of the amount (ISO 4217).Length: 3 charactersExample: BRL
description
string
Description or purpose of the transfer.Max length: 255 characters
external_id
string
Your internal reference ID for this transfer.Max length: 255 characters

Response

id
integer
WEpayment’s auto generated transfer ID.
source_wallet_id
string
Source wallet UUID.
destination_wallet_id
string
Destination wallet UUID.
amount
integer
Transfer amount in cents.
currency
string
Currency code.
description
string
Transfer description.
status
object
Transfer status.
external_id
string
Your internal reference ID.
created_at
string
Creation timestamp.
updated_at
string
Last update timestamp.

Request Example

curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer 123' \
  --header 'Content-Type: application/json' \
  --data '{
    "source_wallet_id": "wallet-uuid-source",
    "destination_wallet_id": "wallet-uuid-destination",
    "amount": 10000,
    "currency": "BRL",
    "description": "Transfer between accounts",
    "external_id": "TRANSFER-001"
  }'
{
  "id": 98765,
  "source_wallet_id": "wallet-uuid-source",
  "destination_wallet_id": "wallet-uuid-destination",
  "amount": 10000,
  "currency": "BRL",
  "description": "Transfer between accounts",
  "status": {
    "id": 1,
    "name": "Completed"
  },
  "external_id": "TRANSFER-001",
  "created_at": "2024-06-13T11:00:00.000000Z",
  "updated_at": "2024-06-13T11:00:00.000000Z"
}

Use Cases

Transfer funds between different merchant accounts:
async function transferBetweenAccounts(fromWallet, toWallet, amount) {
  const transfer = await createTransfer({
    source_wallet_id: fromWallet,
    destination_wallet_id: toWallet,
    amount,
    currency: 'BRL',
    description: 'Inter-account transfer',
    external_id: `TRANSFER-${Date.now()}`
  });
  
  return transfer;
}
Split revenue between partners or sellers:
async function splitRevenue(sourceWallet, splits) {
  const transfers = [];
  
  for (const split of splits) {
    const transfer = await createTransfer({
      source_wallet_id: sourceWallet,
      destination_wallet_id: split.walletId,
      amount: split.amount,
      currency: 'BRL',
      description: `Revenue split - ${split.name}`,
      external_id: `SPLIT-${split.id}`
    });
    
    transfers.push(transfer);
  }
  
  return transfers;
}

// Usage
await splitRevenue('main-wallet-uuid', [
  { walletId: 'partner1-wallet', amount: 5000, name: 'Partner 1', id: 'P1' },
  { walletId: 'partner2-wallet', amount: 3000, name: 'Partner 2', id: 'P2' }
]);
Consolidate funds from multiple wallets into one:
async function consolidateFunds(sourceWallets, destinationWallet) {
  const transfers = [];
  
  for (const source of sourceWallets) {
    // Get balance of source wallet
    const balance = await getWalletBalance(source.walletId);
    
    if (balance > 0) {
      const transfer = await createTransfer({
        source_wallet_id: source.walletId,
        destination_wallet_id: destinationWallet,
        amount: balance,
        currency: 'BRL',
        description: `Consolidation from ${source.name}`,
        external_id: `CONSOLIDATE-${source.id}`
      });
      
      transfers.push(transfer);
    }
  }
  
  return transfers;
}
Release funds from escrow to recipient:
async function releaseEscrow(escrowWallet, recipientWallet, amount, orderId) {
  const transfer = await createTransfer({
    source_wallet_id: escrowWallet,
    destination_wallet_id: recipientWallet,
    amount,
    currency: 'BRL',
    description: `Escrow release for order ${orderId}`,
    external_id: `ESCROW-${orderId}`
  });
  
  return transfer;
}

Best Practices

Check Balance First: Always verify the source wallet has sufficient balance before creating a transfer.
Wallet Validation: Ensure both source and destination wallet UUIDs are valid and belong to accounts you have access to.
Use External ID: Always provide an external_id to track transfers in your system and prevent duplicates.
Instant Transfers: Transfers between wallets are typically instant. Ensure your system can handle immediate balance updates.

Transfer Status

Status IDStatus NameDescription
1CompletedTransfer completed successfully
2FailedTransfer failed
3PendingTransfer is pending