API Referencev1.0
HomeLog inSign up
CARD PAYMENTS

Create a card payment (mock only)

POSThttps://production.dutchapi.co/v1/card-payments

Creates a development-mode mock payment record in pending status. It never contacts Visa, Mastercard, a payment provider, or a merchant wallet.

🔒Send the project API key as a Bearer token and your Business ID with this call.

AVAILABLE ON 25 DECEMBER 2026. Before that date, this endpoint runs only outside production when CARD_PAYMENTS_MODE=mock is enabled. Production requests return 503 card_payments_not_available.

This route is also mounted at POST /api/v1/card-payments for compatibility; the standard API reference uses the /v1 base path.

The response includes mode: mock, liveProcessing: false and a placeholder checkout URL. No card is charged and no card numbers, CVV, PINs or track data may be sent.

Send an Idempotency-Key header. Status changes in development require a signed mock webhook callback; test events are not evidence of a real card transaction.

Body Params

amountnumberrequired

Positive payment amount, up to two decimal places.

currencystringrequired

Supported three-letter currency code: USD, EUR, GBP, CAD, AUD, XAF, NGN, GHS, KES or ZAR.

merchantReferencestringrequired

Unique business reference, 4–64 letters, digits, dot, underscore, colon or hyphen.

customer.namestringoptional

Customer name. Never include card credentials.

customer.emailstringoptional

Customer email address.

descriptionstringoptional

Optional description, up to 140 characters.

returnUrlstringoptional

HTTPS URL for the hosted-checkout return.

webhookUrlstringoptional

HTTPS URL metadata for payment event delivery.

Responses

{
  "id": "cp_mock_4c8f70a64b22458c8de92f3a",
  "object": "card_payment",
  "merchantReference": "order-1042",
  "amount": 25.5,
  "currency": "USD",
  "status": "pending",
  "checkoutUrl": "https://checkout.dutchapi.co/mock/cp_mock_4c8f70a64b22458c8de92f3a",
  "createdAt": "2026-10-28T12:00:00.000Z",
  "mode": "mock",
  "liveProcessing": false
}
{
  "error": "idempotency_key_required",
  "message": "Send an Idempotency-Key header."
}

Errors

StatuserrorMeaning
400idempotency_key_requiredSend an Idempotency-Key header.
400valid_amount_requiredamount must be positive and no greater than the documented limit.
400unsupported_currencycurrency is not on the supported mock currency list.
400merchant_reference_requiredmerchantReference must be 4–64 valid characters.
400card_data_prohibitedCard numbers, CVV, PIN and track data must never be sent.
409duplicate_merchant_referenceThis business already used merchantReference.
503card_payments_not_availableLive card processing is not connected.
Updated 2026
Did this page help you?