🇬🇧
Yativo Documentation
Spanish
English
English
  • Yativo
  • Introduction to Yativo
    • Financial Infrastructure
    • About Us
  • Dashboard
  • Business Plans
  • Getting Started with Yativo API
  • Yativo API Glossary
  • API reference
    • Misc.
      • Countries
      • States
      • City
  • Security and Authentication
    • Security
    • Authentication
    • Idempotency in API Requests
  • Environment
    • Environments
  • Notifications
    • Webhook
  • Compliance
    • Verification
      • KYC
      • KYB
      • KYC/KYB Update
      • KYC Status
      • Global Business Search
    • Supported Jurisdiction
    • Supported Countries, Currencies and Payment Method
  • User Management
    • Customer
      • Get Customers
      • Retrieve customer
      • Add Customer
  • Payments
    • Currencies
    • Crypto Wallets
      • Generate Wallet Address
      • Fetch Wallet Address
      • Crypto Deposit History
      • Single crypto deposit history
    • Payout
      • Payout
      • Get Payouts
      • Get Payout
      • Beneficiaries
        • Get Beneficiaries
        • Add Beneficiary Payment Details
        • Update Beneficiary
        • Archive Beneficiary
        • Add Beneficiary
    • Payin
    • Virtual Cards
      • Supported Currency, Country
      • Create card
      • Fetch card
      • Top up card
      • Get Transactions
      • Freeze and Unfreeze Card
    • Virtual Accounts
      • Create VIrtual Accounts
        • USD Virtual Account
        • Mexico Virtual Account
        • Brazil PIX QR
      • Virtual Account Management
      • Transaction History
  • Foreign Exchange
    • Exchange Rate
      • Request Quote
  • Transactions
    • Transaction Summary
    • Get Single Transaction
  • Crypto System
    • Yativo Crypto Platform API
Powered by GitBook
On this page
  1. Payments
  2. Virtual Accounts

Create Multiple Virtual Accounts

Create virtual account

POST {{baseUrl}}/business/virtual-account/bulk-account-creationThis endpoint allows you to create a virtual account that can be used to receive funds.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

customer_id

number

Customer ID

document_id

string

Document Id number

document_type

string

The Document type

currency

string

USD, ARS, MXN, BRL

Response

{
    "status": "success",
    "status_code": 201,
    "message": "Virtual account creation in progress",
    "data": {
        "account_id": "va_67890",
        "account_number": "9876543210",
        "account_type": "savings",
        "currency": "USD",
        "created_at": "2023-05-27T14:45:00Z"
    }
}
{
  "error": "Invalid request"
}

Request Example

<?php
$baseUrl = 'https://sandbox.yativo.com'; // Replace with the actual base URL
$accessToken = 'YOUR_ACCESS_TOKEN';
$customerId = 'YOUR_CUSTOMER_ID';

$url = $baseUrl . '/business/virtual-account/bulk-account-creation';

$data = [
    'customer_id' => $customerId,
    'beneficiary' => [
        'document' => [
            'id' => 'A10909999',
            'type' => 'PASSPORT'
        ],
        'name' => 'xoxo',
        'lastname' => 'xoxo',
        'type' => 'xoxo'
    ],
    'address' => [
        'city' => 'xoxo',
        'state' => 'xoxo',
        'zipcode' => 'xoxo',
        'street' => 'xoxo',
        'number' => 'xoxo',
        'country' => 'xoxo'
    ],
    'currency' => 'MXN',
    'country' => 'MEX'
];

$options = [
    'http' => [
        'header'  => "Authorization: Bearer $accessToken\r\n" .
                     "Content-Type: application/json\r\n",
        'method'  => 'POST',
        'content' => json_encode($data)
    ]
];

$context  = stream_context_create($options);
$response = file_get_contents($url, false, $context);

if ($response === FALSE) {
    die('Error occurred');
}

$responseData = json_decode($response, true);
print_r($responseData);
?>

Last updated 4 months ago