Docs
ENFR
Dashboard
API reference

Test helpers

Endpoints that simulate what the card issuer would do. They only work with a test key (mr_test_…) and return 400 test_mode_only otherwise.

Simulate a verification decision Test mode only

POST/v1/test/cardholders/{id}/verification

Approves or rejects a cardholder whose verification is in_review. The status changes within seconds and cardholder.kyc_updated is sent.

Key roles: Owner or Finance

Path parameters
idstringRequired

ID of the cardholder.

Body
resultstringRequired

The decision to simulate.

approvedrejected
reasonstringOptionalDefault Document unreadable (simulation)

Only with rejected: becomes verification.reason. Up to 200 characters.

Returns

Returns the cardholder object with 202: the outcome follows by webhook.

Errors worth handling
HTTPCodeDescription
400test_mode_onlyTest helpers need a test key.
400verification_not_submittedThe test helper needs a verification submitted first.
404resource_missingNo object with this ID in this mode.
curl https://api.monerail.com/v1/test/cardholders/5df6acd9-4bac-4e19-869c-fcde6b79f389/verification \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "result": "rejected",
    "reason": "Name/dob mismatch"
  }'
Response202
{
  "id": "5df6acd9-4bac-4e19-869c-fcde6b79f389",
  "object": "cardholder",
  "livemode": false,
  "type": "customer",
  "first_name": "Awa",
  "last_name": "Ndiaye",
  "email": "awa@example.com",
  "phone": "+237670000999",
  "country": "CM",
  "city": "Douala",
  "birth_date": "1991-02-03",
  "id_document": "national_id",
  "id_number_last4": "3408",
  "verification": {
    "status": "in_review",
    "reason": null,
    "verified_at": null
  },
  "created_at": "2026-10-30T13:47:06.394Z",
  "updated_at": "2026-10-30T13:47:09.807Z"
}

Simulate a card payment Test mode only

POST/v1/test/cards/{id}/authorizations

Simulates a merchant charging the card. An approved payment and its fee appear on the card within seconds, with a card.transaction event. A declined one sends card.authorization_declined, charges nothing and returns authorization: null.

Key roles: Owner or Finance

Path parameters
idstringRequired

ID of the card.

Body
amountintegerRequired

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

merchantstringOptional

Merchant name, up to 40 characters.

statusstringOptionalDefault approved

Outcome of the simulated payment.

approveddeclined
Returns

Returns the test authorization object with 202: the outcome follows by webhook.

Errors worth handling
HTTPCodeDescription
400test_mode_onlyTest helpers need a test key.
404resource_missingNo object with this ID in this mode.
curl https://api.monerail.com/v1/test/cards/ce2f0aea-7f87-4cbd-8383-03129d1253e0/authorizations \
  -H "Authorization: Bearer $MONERAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 400,
    "merchant": "Notion"
  }'
Response202
{
  "object": "test_authorization",
  "card": "ce2f0aea-7f87-4cbd-8383-03129d1253e0",
  "amount": 400,
  "currency": "USD",
  "merchant": "Notion",
  "status": "approved",
  "authorization": "auth_7731"
}