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
/v1/mintsRecords 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
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer <key> with mint:create (and mint:execute to confirm fiat) |
Idempotency-Key | yes | A UUID you generate per logical operation, at most 255 characters |
Content-Type | yes | application/json |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
referenceId | string | yes | 8 to 100 characters: letters, numbers, dot, underscore, dash, colon. Unique within your integration |
amountMyr | string | yes | Positive decimal, at most 6 decimal places |
walletAddress | string | yes | Checksummed EVM address that receives MYRT |
customerId | string | yes | A customer linked to your integration |
chainId | number | no | Defaults to the active chain |
fiatConfirmed | boolean | no | Default false. true only once MYR has settled irreversibly |
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
}'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();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
{
"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
| Code | HTTP |
|---|---|
INVALID_JSON | 400 |
IDEMPOTENCY_KEY_REQUIRED | 400 |
INVALID_AMOUNT | 400 |
INVALID_WALLET_ADDRESS | 400 |
INVALID_REFERENCE_ID | 400 |
AMOUNT_NEGATIVE_OR_ZERO | 400 |
AMOUNT_BELOW_FLOOR | 400 |
FOREIGNER_LIMIT_EXCEEDED | 400 |
POLICY_REJECTED | 400 |
SCOPE_DENIED | 403 |
CUSTOMER_NOT_VERIFIED | 403 |
NOT_FOUND | 404 |
IDEMPOTENCY_CONFLICT | 409 |
SETTLEMENT_FAILED | 502 |
See errors for the meaning of each code.
Read a mint order
/v1/mints/{referenceId}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
| Parameter | Type | Notes |
|---|---|---|
referenceId | string | The referenceId you supplied on creation |
curl https://sandbox-api.myrt.money/v1/mints/acme:mint:2026-09-10:00417 \
-H "Authorization: Bearer $MYRT_API_KEY"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();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
{
"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
| Code | HTTP |
|---|---|
INVALID_REFERENCE_ID | 400 |
NOT_FOUND | 404 |
Cancel a mint order
/v1/mints/{referenceId}/cancelPlanned
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
| Parameter | Type | Notes |
|---|---|---|
referenceId | string | The referenceId you supplied on creation |
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer <key> with mint:create |
Idempotency-Key | yes | A UUID you generate per logical operation |
Response 200 OK with the order object.
Errors
| Code | HTTP |
|---|---|
IDEMPOTENCY_KEY_REQUIRED | 400 |
INVALID_REFERENCE_ID | 400 |
NOT_FOUND | 404 |
ORDER_NOT_CANCELLABLE | 409 |
