Move funds
A transfer moves money between two wallets in the same party, landing instantly. Create one withPOST /transfers/internal.
import uuid
from naturalpay import Natural
client = Natural()
transfer = client.transfers.initiate_internal(
amount=5_000,
source_wallet_id="wal_550e8400e29b41d4a716446655440000",
dest_wallet_id="wal_7c9e6679e29b41d4a716446655440002",
description="Sweep to Vault",
idempotency_key=str(uuid.uuid4()),
)
print(transfer.data.id)
import Natural from "@naturalpay/sdk";
const client = new Natural();
const transfer = await client.transfers.initiateInternal({
amount: 5_000,
sourceWalletId: "wal_550e8400e29b41d4a716446655440000",
destWalletId: "wal_7c9e6679e29b41d4a716446655440002",
description: "Sweep to Vault",
idempotencyKey: crypto.randomUUID(),
});
console.log(transfer.data.id);
natural transfers initiateInternal \
--amount 5000 \
--source-wallet-id wal_550e8400e29b41d4a716446655440000 \
--dest-wallet-id wal_7c9e6679e29b41d4a716446655440002 \
--description "Sweep to Vault" \
--idempotency-key "$(uuidgen)"
Move $50 from my operating wallet to my Vault.
curl -X POST https://api.natural.com/transfers/internal \
-H "Authorization: Bearer $NATURAL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"data": {
"attributes": {
"amount": 5000,
"sourceWalletId": "wal_550e8400e29b41d4a716446655440000",
"destWalletId": "wal_7c9e6679e29b41d4a716446655440002",
"description": "Sweep to Vault"
}
}
}'