Initiate token purchase

Initiate a new token purchase - exchange real currency for virtual tokens.

Request
Security:
tilia_auth (write_tokens)
Request Body schema: application/json

Create Token Purchase request

payment_method_id
required
string <= 36 characters

The payment method id to charge for purchasing tokens.

amount
required
integer

The number of virtual tokens to purchase. Specified in your virtual currency.

currency
required
string

Your virtual currency code.

destination_account_id
string <= 36 characters

An optional account ID for who should receive the tokens upon purchase. If this field is omitted, the funds will go the payment method owner. This field allows you to purchase tokens for somebody else.

Responses
201

Successfully created token purchase.

400

Invalid input

401

Unauthorized access.

403

Disallowed from transacting.

500

Service unavailable or server error.

post/v2/token/purchase
Request samples
application/json
{
  • "payment_method_id": "pm_2V2bA0r2hJpUnCA9HeTgOl0rONr",
  • "amount": 250,
  • "currency": "VCD",
  • "destination_account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b"
}
Response samples
application/json
{
  • "status": "Success",
  • "payload": {
    }
}