Docs
ENFR
Dashboard
API reference

Cards

Virtual Visa and Mastercard cards in US dollars. A card is funded from your cards balance and can be frozen, emptied to the cards balance or terminated at any time. Amounts are in US cents. When the issuer’s answer to an action is not final, the API returns 202 and the result arrives by webhook.

The card object

Attributes
idstring

Unique identifier (UUID).

livemodeboolean

true for live objects, false for test objects.

objectstring

Always card.

typestring

agent cards belong to an AI agent and have no cardholder.

teamcustomeragent
statusstring

pending while the issuer creates the card, failed if it could not.

pendingactivefrozenterminatedfailed
cardholderstring | null

Cardholder ID.

agent_namestring | null

Agent cards only.

labelstring | null

Your label for the card.

networkstring
visamastercard
last4string | null

Last 4 digits of the card number.

exp_monthinteger | null
exp_yearinteger | null
currencystring

Always USD.

balanceinteger | null

Card balance in US cents.

single_useboolean

Single-use card: it can be paid once; later payments are declined. It cannot be funded or withdrawn from.

spending_limitobject | null

{ amount, interval } with interval daily or per_transaction. Always null for single-use cards.

created_atstring

Creation time, ISO 8601 (UTC).

terminated_atstring | null
The card object
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Create a card

POST/v1/cards

Issues a card to a verified cardholder (or to an AI agent with type: "agent"). amount is taken from your cards balance: it must cover the issuing fee plus at least $1. Returns 201 when the card is active, or 202 with status: "pending" while the issuer finishes or when its answer is not final yet; card.issued or card.issue_failed follows. The money returns to the cards balance only once a failure is final.

Key roles: Owner or Finance

Body
amountintegerRequired

Initial funding in US cents, taken from the cards balance. Up to 10,000,000.

cardholderstringOptional

Cardholder ID. Required unless type is agent.

typestringOptionalDefault team

agent for an agent card. For other cards, the card takes the type of its cardholder.

teamcustomeragent
agent_namestringOptional

Required for agent cards. Up to 60 characters.

labelstringOptional

Your label, up to 60 characters.

networkstringOptionalDefault visa
visamastercard
single_usebooleanOptionalDefault false

The card can be paid once. Later payments are declined and nothing is charged. It cannot be funded or withdrawn from; its remaining balance returns to the cards balance when it is terminated (automatically 30 days after issue, or with terminate).

spending_limitobjectOptional

Spending limit. Not allowed with single_use: true (the card amount is the limit): sending both returns 400 parameter_invalid.

Show child attributes
amountintegerRequired

In US cents.

intervalstringRequired
dailyper_transaction
Returns

Returns the new card object with 201, or 202 when the outcome is not final yet.

Errors worth handling
HTTPCodeDescription
400cardholder_not_verifiedThe cardholder’s identity is not verified yet.
400amount_too_smallAmount below the minimum (for cards: issuing fee plus $1).
400parameter_invalidA parameter has the wrong type or value. See param.
402balance_insufficientYour balance (or cards balance) does not cover the amount and the fee.
400agent_cards_not_enabledAgent cards are not set up yet. An Owner must issue the first agent card from the dashboard.
402provider_declinedThe operator or the card issuer declined. message gives their reason.
curl https://api.monerail.com/v1/cards \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a1f3c9e2-5b7d-4c21-9f80-3e6b2d1c7a45" \
  -d '{
    "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
    "type": "customer",
    "label": "Subscriptions",
    "amount": 1000,
    "spending_limit": {
      "amount": 20000,
      "interval": "daily"
    }
  }'
Response201
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Retrieve a card

GET/v1/cards/{id}

The full card number and CVC are never returned by the API. An Owner or Finance member can display them for 60 seconds in the dashboard (Show card details).

Key roles: Every role

Path parameters
idstringRequired

ID of the card.

Returns

Returns the card object.

curl https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0 \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

List cards

GET/v1/cards

Newest first.

Key roles: Every role

Query parameters
statusstringOptional

Only the cards with this status.

pendingactivefrozenterminatedfailed
cardholderstringOptional

Only the cards of this cardholder (ID).

limitintegerOptionalDefault 20

Number of objects to return, 1 to 100.

starting_afterstringOptional

Cursor: the ID of the last object of the previous page.

Returns

Returns a list object: data holds up to limit card objects, and has_more tells whether more follow.

curl "https://api.monerail.com/v1/cards?status=active&limit=10" \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "object": "list",
  "url": "/v1/cards",
  "data": [
    {
      "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
      "object": "card",
      "livemode": false,
      "type": "customer",
      "status": "active",
      "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
      "agent_name": null,
      "label": "Subscriptions",
      "network": "visa",
      "last4": "5904",
      "exp_month": 10,
      "exp_year": 2029,
      "currency": "USD",
      "balance": 950,
      "single_use": false,
      "spending_limit": {
        "amount": 20000,
        "interval": "daily"
      },
      "created_at": "2026-10-30T13:47:06.394Z",
      "terminated_at": null
    }
  ],
  "has_more": false
}

Fund a card

POST/v1/cards/{id}/fund

Moves money from the cards balance to the card. Like every card action, returns 202 instead of 200 when the issuer’s answer is not final yet: the operation is not failed, and its result arrives by webhook (card.funded). Not available for single-use cards.

Key roles: Owner or Finance

Path parameters
idstringRequired

ID of the card.

Body
amountintegerRequired

In US cents, up to 10,000,000.

Returns

Returns the card object with 200, or 202 when the issuer’s answer is not final yet.

Errors worth handling
HTTPCodeDescription
402balance_insufficientYour balance (or cards balance) does not cover the amount and the fee.
400card_single_useSingle-use cards cannot be funded or withdrawn from.
409card_operation_in_progressAnother operation is running on this card. Retry in a few seconds.
curl https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/fund \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a1f3c9e2-5b7d-4c21-9f80-3e6b2d1c7a45" \
  -d '{
    "amount": 5000
  }'
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 5950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Withdraw from a card

POST/v1/cards/{id}/withdraw

Moves money from the card back to the cards balance. At least $1 must stay on the card. Not available for single-use cards. card.withdrawn confirms it.

Key roles: Owner or Finance

Path parameters
idstringRequired

ID of the card.

Body
amountintegerRequired

In US cents.

Returns

Returns the card object with 200, or 202 when the issuer’s answer is not final yet.

Errors worth handling
HTTPCodeDescription
400card_minimum_balanceAt least $1 must stay on the card.
400card_single_useSingle-use cards cannot be funded or withdrawn from.
409card_operation_in_progressAnother operation is running on this card. Retry in a few seconds.
curl https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/withdraw \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a1f3c9e2-5b7d-4c21-9f80-3e6b2d1c7a45" \
  -d '{
    "amount": 500
  }'
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 450,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Freeze a card

POST/v1/cards/{id}/freeze

Declines every new payment until the card is unfrozen. card.frozen confirms it.

Key roles: Owner, Finance or Approver

Path parameters
idstringRequired

ID of the card.

Returns

Returns the card object with 200, or 202 when the issuer’s answer is not final yet.

Errors worth handling
HTTPCodeDescription
400card_already_frozenThe card is already frozen.
curl -X POST https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/freeze \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "frozen",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Unfreeze a card

POST/v1/cards/{id}/unfreeze

Accepts payments again. card.unfrozen confirms it.

Key roles: Owner, Finance or Approver

Path parameters
idstringRequired

ID of the card.

Returns

Returns the card object with 200, or 202 when the issuer’s answer is not final yet.

Errors worth handling
HTTPCodeDescription
400card_not_frozenThe card is not frozen.
curl -X POST https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/unfreeze \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "active",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 950,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": null
}

Terminate a card

POST/v1/cards/{id}/terminate

Closes the card for good. Its remaining balance returns to the cards balance. This cannot be undone. card.terminated confirms it.

Key roles: Owner or Finance

Path parameters
idstringRequired

ID of the card.

Returns

Returns the card object with 200, or 202 when the issuer’s answer is not final yet.

curl -X POST https://api.monerail.com/v1/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/terminate \
  -H "Authorization: Bearer $MONERAIL_KEY"
Response200
{
  "id": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "object": "card",
  "livemode": false,
  "type": "customer",
  "status": "terminated",
  "cardholder": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "agent_name": null,
  "label": "Subscriptions",
  "network": "visa",
  "last4": "5904",
  "exp_month": 10,
  "exp_year": 2029,
  "currency": "USD",
  "balance": 0,
  "single_use": false,
  "spending_limit": {
    "amount": 20000,
    "interval": "daily"
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "terminated_at": "2026-10-30T13:47:09.807Z"
}