Skip to main content

Create an Order

Tokenize or Redeem stablecoin tokens between your own bank accounts and wallets.

  • TOKENIZE orders convert fiat funds to stablecoin tokens.
  • REDEEM orders convert stablecoin tokens back to fiat funds.

Orders are for tokenizing or redeeming stablecoin tokens, solely between Minteo and you as the Customer, not from or to third parties. That is, the funds to be tokenized come strictly from a Customer's bank account, or the tokens to be redeemed come exclusively from a Customer's wallet.

info

If want to use stablecoins to send funds to third parties' local bank accounts (your own users / customers), please refer to the Payouts guide. Conversely, if you're looking to tokenize funds coming from your users' local bank accounts, please refer to the Payins guide.

Endpoint

POST /v1/orders

Scope

orders:create

Request Body

NameTypeDescription
typeTOKENIZE or REDEEMType of order to be created.
TOKENIZE for tokenization of funds into stablecoin tokens.
REDEEM for redemption of stablecoin tokens back again into funds.
amountstringAmount of funds to tokenize or tokens to be redeemed.
Make sure to use a string, not a number, to avoid precision issues.
origin_source_iduuidTOKENIZE orders: ID of the origin bank account where funds are coming from.
REDEEM orders: ID of the wallet where tokens are coming from.
destination_source_iduuidTOKENIZE orders: ID of the destination wallet where tokens will be sent.
REDEEM orders: ID of the destination bank account where funds will be sent.
external_identifierstringA unique identifier of the order in your own system (database ID, etc.).
origin_funding_data 1
1 Only required for TOKENIZE orders.
JSONThe origin funding data.

TOKENIZE Example Request

{
"type": "TOKENIZE",
"amount": "1225000.50",
"origin_source_id": "2af83836-43ea-407b-ab4e-9c64ee817b28", // Bank Account ID
"destination_source_id": "ffdda2d3-4278-45ac-b244-8499dc1a8906", // Wallet ID
"external_identifier": "bc03a2173a2890",
"origin_funding_data": {
"deposit_originated_at": "2023-08-01",
}
}

REDEEM Example Request

{
"type": "REDEEM",
"amount": "865000.72",
"origin_source_id": "ffdda2d3-4278-45ac-b244-8499dc1a8906", // Wallet ID
"destination_source_id": "2af83836-43ea-407b-ab4e-9c64ee817b28", // Bank Account ID
"external_identifier": "a834f20c2812983"
}

Response

NameTypeDescription
outputOrderThe order created.
codestringThe response status code text.

Response Body (Redeem or Tokenize)

{
"output": {
"id": "84203386-d88a-92cb-b5fe-61c328euffhueif49",
"status": "PENDING",
"amount": "2000",
"type": "TOKENIZE",
"created_at": "2023-11-04T01:35:34.165Z",
"updated_at": "2023-11-04T01:35:34.165Z",
"origin_source_id": "F7D07279-253D-4003-9A0D-B512F6C14A21",
"destination_source_id": "AEA37EBA-F1DF-4FE5-805B-A09A25BB4921",
"activities": [
{
"type": "SETTLE_ORDER",
"status": "PENDING",
"last_update_at": "2023-11-04T01:35:34.162Z"
}
],
"status_code": null,
"chain": "POLYGON",
"public_data": {
"deposit_originated_at": "2023-11-13T00:00:00.000Z"
},
"external_identifier": "bc03a2173a2890",
"effective_amount": "2000",
},
"code": "OK"
}

Example

curl -X POST 'https://api.minteo.finance/v1/orders' \
-H 'Authorization: Bearer <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{
"type": "TOKENIZE",
"amount": "120022342.234234",
"origin_source_id": "2af83836-43ea-407b-ab4e-9c64ee817b28",
"destination_source_id": "ffdda2d3-4278-45ac-b244-8499dc1a8906",
"external_identifier": "bc03a2173a2890",
"origin_funding_data": {
"deposit_originated_at": "2023-08-01",
}
}'