Create Virtual Accounts

POST
/api/v1/customers/{customerId}/virtual-accounts

Create a virtual account for a customer. deposit_handling_mode is set server-side (defaults to auto_payout).

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Path Parameters

customerId*string

Customer UUID

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

idempotency-key*string

Required for mutating calls. Use a V4 UUID. The server stores the first result for 24h and returns it on subsequent retries with the same key.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json
  1. body
source*
metadata?
workflow_type?string
Default"fiat_to_crypto"
Value in"fiat_to_crypto""fiat_to_fiat"
destination?
fiat_destination?

Response Body

Default Response

application/json
  1. response
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
status*string
Value in"activated""deactivated""pending""closed"
deactivation_reason*|null
customer_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
created_at*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
source_deposit_instructions*
deposit_handling_mode*string
Value in"auto_payout""hold""manual"
workflow_type*string
Value in"fiat_to_crypto""fiat_to_fiat"
destination*|null
fiat_destination*|null
held_balance*|null
deposit_stats?
metadata?|null
Example Request
curl -X POST 'https://api.sandbox.stables.money/api/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/virtual-accounts' \  -H 'idempotency-key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "source": {}}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "activated",  "deactivation_reason": "NONPAYMENT",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "created_at": "2019-08-24T14:15:22Z",  "source_deposit_instructions": {    "currency": "string",    "payment_rails": [      "ach_push"    ],    "bank_name": "string",    "bank_address": "string",    "bank_beneficiary_name": "string",    "bank_beneficiary_address": "string",    "bank_account_number": "string",    "bank_routing_number": "string",    "iban": "string",    "bic": "string",    "pix_key": "string",    "clabe": "string",    "account_holder_name": "string",    "pay_id": "string",    "pay_id_name": "string"  },  "deposit_handling_mode": "auto_payout",  "workflow_type": "fiat_to_crypto",  "destination": {    "currency": "usdc",    "payment_rail": "arbitrum",    "address": "string",    "memo": "string"  },  "fiat_destination": {    "type": "bank",    "recipient_type": "individual",    "date_of_birth": "string",    "phone": "string",    "account_holder_name": "string",    "account_number": "string",    "iban": "string",    "pay_id": "string",    "pay_id_type": "email",    "bank_name": "string",    "bank_country": null,    "currency": null,    "account_type": "savings",    "branch_name": "string",    "address": {      "street": "string",      "city": "string",      "state": "string",      "postal_code": "string",      "country": "string"    },    "swift_code": "string",    "bic_code": "string",    "ifsc_code": "string",    "aba_code": "string",    "sort_code": "string",    "branch_code": "string",    "bsb_code": "string",    "bank_code": "string",    "cnaps": "string",    "name_in_local_language": "string",    "national_identification_number": "string",    "logistics_tracking_details": [      {        "tracking_number": "string",        "logistics_provider": {          "name": "string",          "code": "string"        }      }    ],    "documents": [      {        "type": "invoice",        "base64_url": "string"      }    ]  },  "held_balance": {    "amount": "string",    "currency": "string"  },  "deposit_stats": {    "total_deposit_count": 0,    "total_deposit_amount": "string",    "last_deposit_at": "2019-08-24T14:15:22Z"  },  "metadata": {    "property1": null,    "property2": null  }}