Skip to content

Mints

Issue MYRT against confirmed MYR. The flow and the reasoning are in the mint guide; this page states the shapes.

Create a mint order

POST/v1/mintsmint:create

Records a mint order for a linked customer. With fiatConfirmed: false the order waits in payment_pending. With fiatConfirmed: true, on a key holding mint:execute, it is submitted for settlement.

Headers

HeaderRequiredValue
AuthorizationyesBearer <key> with mint:create (and mint:execute to confirm fiat)
Idempotency-KeyyesA UUID you generate per logical operation, at most 255 characters
Content-Typeyesapplication/json

Request body

FieldTypeRequiredNotes
referenceIdstringyes8 to 100 characters: letters, numbers, dot, underscore, dash, colon. Unique within your integration
amountMyrstringyesPositive decimal, at most 6 decimal places
walletAddressstringyesChecksummed EVM address that receives MYRT
customerIdstringyesA customer linked to your integration
chainIdnumbernoDefaults to the active chain
fiatConfirmedbooleannoDefault false. true only once MYR has settled irreversibly
bash
curl -X POST https://sandbox-api.myrt.money/v1/mints \
  -H "Authorization: Bearer $MYRT_API_KEY" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceId": "acme:mint:2026-09-10:00417",
    "amountMyr": "1000.00",
    "walletAddress": "0xAbC0000000000000000000000000000000000001",
    "customerId": "cus_9f2a3b4c",
    "fiatConfirmed": false
  }'
ts
import { randomUUID } from "node:crypto";

const res = await fetch("https://sandbox-api.myrt.money/v1/mints", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MYRT_API_KEY}`,
    "Idempotency-Key": randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    referenceId: "acme:mint:2026-09-10:00417",
    amountMyr: "1000.00",
    walletAddress: "0xAbC0000000000000000000000000000000000001",
    customerId: "cus_9f2a3b4c",
    fiatConfirmed: false,
  }),
});
const order = await res.json();
python
import os, uuid, requests

res = requests.post(
    "https://sandbox-api.myrt.money/v1/mints",
    headers={
        "Authorization": f"Bearer {os.environ['MYRT_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "referenceId": "acme:mint:2026-09-10:00417",
        "amountMyr": "1000.00",
        "walletAddress": "0xAbC0000000000000000000000000000000000001",
        "customerId": "cus_9f2a3b4c",
        "fiatConfirmed": False,
    },
    timeout=30,
)
order = res.json()

Response 201 Created

json
{
  "ok": true,
  "referenceId": "acme:mint:2026-09-10:00417",
  "status": "payment_pending",
  "phase": "PAYMENT_PENDING",
  "direction": "MINT",
  "chainId": 1,
  "network": "Ethereum",
  "tokenAddress": "0x...",
  "walletAddress": "0xAbC0000000000000000000000000000000000001",
  "amounts": {
    "myr": "1000.00",
    "myrt": "1000.00",
    "feeMyr": "1.00",
    "amountRaw": "1000000000",
    "decimals": 6
  },
  "blockchain": { "txHash": null, "blockNumber": null },
  "timestamps": { "createdAt": "2026-09-10T04:12:33.918Z", "updatedAt": null }
}

For a mint, myrt equals myr. feeMyr is the payment rail charge recorded on the order and does not reduce the MYRT issued.

A replay of the same Idempotency-Key and body returns this response again with X-MYRT-Idempotent-Replay: true.

Errors

CodeHTTP
INVALID_JSON400
IDEMPOTENCY_KEY_REQUIRED400
INVALID_AMOUNT400
INVALID_WALLET_ADDRESS400
INVALID_REFERENCE_ID400
AMOUNT_NEGATIVE_OR_ZERO400
AMOUNT_BELOW_FLOOR400
FOREIGNER_LIMIT_EXCEEDED400
POLICY_REJECTED400
SCOPE_DENIED403
CUSTOMER_NOT_VERIFIED403
NOT_FOUND404
IDEMPOTENCY_CONFLICT409
SETTLEMENT_FAILED502

See errors for the meaning of each code.

Read a mint order

GET/v1/mints/{referenceId}mint:read

Returns the current state of a mint order you created. An order created by anyone else returns 404 NOT_FOUND, the same as an order that does not exist.

Path parameters

ParameterTypeNotes
referenceIdstringThe referenceId you supplied on creation
bash
curl https://sandbox-api.myrt.money/v1/mints/acme:mint:2026-09-10:00417 \
  -H "Authorization: Bearer $MYRT_API_KEY"
ts
const res = await fetch(
  "https://sandbox-api.myrt.money/v1/mints/acme:mint:2026-09-10:00417",
  { headers: { Authorization: `Bearer ${process.env.MYRT_API_KEY}` } }
);
const order = await res.json();
python
import os, requests

res = requests.get(
    "https://sandbox-api.myrt.money/v1/mints/acme:mint:2026-09-10:00417",
    headers={"Authorization": f"Bearer {os.environ['MYRT_API_KEY']}"},
    timeout=30,
)
order = res.json()

Response 200 OK

json
{
  "ok": true,
  "referenceId": "acme:mint:2026-09-10:00417",
  "status": "completed",
  "phase": "COMPLETED",
  "direction": "MINT",
  "chainId": 1,
  "network": "Ethereum",
  "tokenAddress": "0x...",
  "walletAddress": "0xAbC0000000000000000000000000000000000001",
  "amounts": {
    "myr": "1000.00",
    "myrt": "1000.00",
    "feeMyr": "1.00",
    "amountRaw": "1000000000",
    "decimals": 6
  },
  "blockchain": { "txHash": "0x...", "blockNumber": "20481922" },
  "timestamps": { "createdAt": "2026-09-10T04:12:33.918Z", "updatedAt": "2026-09-10T04:19:02.441Z" }
}

Errors

CodeHTTP
INVALID_REFERENCE_ID400
NOT_FOUND404

Cancel a mint order

POST/v1/mints/{referenceId}/cancelmint:createPlanned

Planned

This is part of the v1 contract and is documented ahead of release. It is not yet served in production. Build against it only once this notice is gone.

Cancels a mint order that has not yet been submitted for settlement. The response is the order object with status: "cancelled". An order that has already been submitted cannot be cancelled.

Path parameters

ParameterTypeNotes
referenceIdstringThe referenceId you supplied on creation

Headers

HeaderRequiredValue
AuthorizationyesBearer <key> with mint:create
Idempotency-KeyyesA UUID you generate per logical operation

Response 200 OK with the order object.

Errors

CodeHTTP
IDEMPOTENCY_KEY_REQUIRED400
INVALID_REFERENCE_ID400
NOT_FOUND404
ORDER_NOT_CANCELLABLE409

MYRT is a 1:1 Ringgit-backed stablecoin on Ethereum.