Skip to content
API DocsDocs

Process Card Payment

Card Payments — Process Card Payment

12 min readUpdated Apr 24, 2026

POST /api/v1/payments/card

Initiate a new card payment transaction. Charges the customer's card for the specified amount. Supports 3D Secure authentication when requested or required by the card issuer.

Guide: Initiating a Card Payment — conceptual walkthrough, flow diagrams, and integration patterns.

#Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {token} — see Authentication

#Request Body Parameters

FieldTypeRequiredDescription
requestIdStringYesUnique identifier for the request. Used for idempotency — if you retry with the same requestId, the system will return the original response instead of processing a duplicate.
midStringYesMerchant account ID. Identifies which merchant account the transaction is associated with.
cardObject — See CardYes
amountStringYesTransaction amount as a decimal string in major currency units (e.g. "10.00" = ten dollars). Values with more than two decimal places are automatically rounded.
currencyStringYesThree-letter ISO 4217 currency code (e.g. USD, EUR, GBP).
langStringNoTwo-letter language code (e.g. en, fr, de) for localizing payment pages and customer-facing messages.
callbackUrlStringNoServer-to-server webhook URL. Exirom sends a POST with the final transaction result to this URL. See Webhook Callbacks.
successRedirectUrlStringNoURL to redirect the customer after a successful payment or 3D Secure authentication.
failureRedirectUrlStringNoURL to redirect the customer after a failed payment or 3D Secure authentication.
billingDetailsObject — See BillingDetailsYes
orderObject — See OrderYes
deviceObject — See DeviceYes
kycVerifiedBooleanNoWhether the customer has passed KYC (Know Your Customer) verification on your platform.
previousPaymentCountIntegerNoNumber of previous successful payments by this customer on your platform. Used for risk scoring.
metadataMap<String, String>NoArbitrary key-value pairs for your own use (e.g. order reference, campaign ID). Returned unchanged in responses and callbacks.
FieldTypeRequiredDescription
numberStringYesFull card number (PAN). Must be a numeric string with no spaces or dashes. Handled securely and never stored in plaintext.
cardHolderNameStringNoCardholder's name as printed on the card.
expMonthStringYesCard expiration month in MM format (e.g. "08" for August).
expYearStringYesCard expiration year in YYYY format (e.g. "2027").
cvvStringYesCard verification value (CVV/CVC) — the 3- or 4-digit security code on the card.
requestThreeDSecureBooleanYesSet to true to request 3D Secure authentication. Even if false, some card issuers may still require 3DS.
FieldTypeRequiredDescription
externalUserIdStringNoYour internal customer identifier. Useful for linking transactions to user accounts in your system.
firstNameStringNoCustomer's first name. Required for 3DS2 frictionless flow.
lastNameStringNoCustomer's last name. Required for 3DS2 frictionless flow.
address1StringNoBilling street address (line 1). Required for 3DS2 frictionless flow.
cityStringNoBilling city. Required for 3DS2 frictionless flow.
stateStringNoBilling state or province.
countryStringNoBilling country as an ISO 3166-1 alpha-2 code (e.g. US, GB, DE).
postalCodeStringNoBilling ZIP or postal code.
phoneStringNoCustomer's phone number (including country code). Required for 3DS2 frictionless flow.
emailStringYesCustomer's email address.
dateOfBirthStringNoCustomer's date of birth in YYYY-MM-DD format. Required for 3DS2 frictionless flow.
FieldTypeRequiredDescription
dateStringNoOrder date in ISO 8601 format (e.g. 2025-07-17).
orderIdStringNoYour unique order identifier for reconciliation.
titleStringNoOrder title or description (e.g. "Monthly Subscription").
siteIdStringNoIdentifier for the site or platform where the order originated.
nameStringNoCustomer name associated with the order.
domainNameStringNoDomain where the order was placed (e.g. "shop.example.com").
FieldTypeRequiredDescription
deviceIdStringNoUnique identifier for the customer's device, if you generate one.
fingerprintDataStringNoDevice fingerprint hash for risk assessment and fraud prevention.
ipStringNoCustomer's IP address. Used for geolocation and risk scoring.
acceptStringNoBrowser's Accept header value. Required for 3D Secure.
acceptLanguageStringNoBrowser's Accept-Language header. Required for 3D Secure.
acceptHeaderStringNoAlternative Accept header field. Required for 3D Secure if accept is not provided.
userAgentStringNoBrowser's User-Agent string.
javaEnabledBooleanNoWhether Java is enabled in the browser. Required for 3D Secure.
javaScriptEnabledBooleanNoWhether JavaScript is enabled. Required for 3D Secure.
deviceLanguageStringNoDevice's language setting (e.g. en). Required for 3D Secure.
colorDepthStringNoScreen color depth (e.g. "24" for 24-bit). Required for 3D Secure.
screenHeightStringNoScreen height in pixels. Required for 3D Secure.
screenWidthStringNoScreen width in pixels. Required for 3D Secure.
deviceTimezoneStringNoDevice timezone offset or name (e.g. "America/New_York"). Required for 3D Secure.

#Response

FieldTypeDescription
transactionIdStringUnique transaction identifier assigned by Exirom. Use this ID to query status, retrieve info, or reference the transaction in support requests.
transactionStatusString (NEW, PENDING, FAILED, REFUNDED, CUSTOMER_VERIFICATION, ...)Current status of the transaction. See Transaction Status Guide for the full lifecycle.
declineCodeIntegerNumeric code indicating the reason for a decline. Only present when the transaction is FAILED. See Decline Codes Reference.
challengeUrlStringURL to redirect the customer for 3D Secure authentication. Present when transactionStatus is CUSTOMER_VERIFICATION.
challengeUrlIframeStringEmbeddable 3D Secure challenge URL for iframe integration. Present when transactionStatus is CUSTOMER_VERIFICATION.
paymentTypeString (CARD, APM)Payment type identifier: CARD for card transactions, APM for alternative payment methods.
{
  "requestId": "req_abc123",
  "mid": "merchant_123",
  "card": {
    "number": "4111111111111111",
    "cardHolderName": "John Doe",
    "expMonth": "12",
    "expYear": "2027",
    "cvv": "123",
    "requestThreeDSecure": true
  },
  "amount": "100.00",
  "currency": "USD",
  "lang": "en",
  "callbackUrl": "https://yourserver.com/callback",
  "successRedirectUrl": "https://yourserver.com/callback",
  "failureRedirectUrl": "https://yourserver.com/callback",
  "billingDetails": {
    "externalUserId": "example_externalUserId",
    "firstName": "John",
    "lastName": "Doe",
    "address1": "123 Main St",
    "city": "New York",
    "state": "NY",
    "country": "US",
    "postalCode": "10001",
    "phone": "+12125551234",
    "email": "test@example.com",
    "dateOfBirth": "2025-07-17"
  },
  "order": {
    "date": "2025-07-17",
    "orderId": "ord_789",
    "title": "Product Purchase",
    "siteId": "site_001",
    "name": "John Doe",
    "domainName": "shop.example.com"
  },
  "device": {
    "deviceId": "example_deviceId",
    "fingerprintData": "example_fingerprintData",
    "ip": "192.168.1.1",
    "accept": "text/html,application/json",
    "acceptLanguage": "en-US,en;q=0.9",
    "acceptHeader": "text/html,application/json",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
    "javaEnabled": true,
    "javaScriptEnabled": true,
    "deviceLanguage": "en",
    "colorDepth": "24",
    "screenHeight": "1080",
    "screenWidth": "1920",
    "deviceTimezone": "America/New_York"
  },
  "kycVerified": true,
  "previousPaymentCount": 12345,
  "metadata": {
    "key1": "value1"
  }
}
{
  "transactionId": "example_transactionId",
  "transactionStatus": "NEW",
  "declineCode": 12345,
  "challengeUrl": "https://yourserver.com/callback",
  "challengeUrlIframe": "https://yourserver.com/callback",
  "paymentType": "CARD"
}

Idempotency: The requestId field ensures idempotent processing. If you retry a request with the same requestId, the original response is returned without reprocessing.

#Error Responses

HTTP StatusDescription
400Bad Request — missing or invalid parameters. Check the response body for field-level details.
401Unauthorized — missing, expired, or invalid bearer token. Re-authenticate via POST /api/v1/auth.
404Not Found — the requested resource does not exist.
500Internal Server Error — an unexpected error occurred. Retry with exponential backoff.
curl -X POST https://sandbox.api.exirom.com/api/v1/payments/card \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
  "requestId": "req_abc123",
  "mid": "merchant_123",
  "card": {
    "number": "4111111111111111",
    "cardHolderName": "John Doe",
    "expMonth": "12",
    "expYear": "2027",
    "cvv": "123",
    "requestThreeDSecure": true
  },
  "amount": "100.00",
  "currency": "USD",
  "lang": "en",
  "callbackUrl": "https://yourserver.com/callback",
  "successRedirectUrl": "https://yourserver.com/callback",
  "failureRedirectUrl": "https://yourserver.com/callback",
  "billingDetails": {
    "externalUserId": "example_externalUserId",
    "firstName": "John",
    "lastName": "Doe",
    "address1": "123 Main St",
    "city": "New York",
    "state": "NY",
    "country": "US",
    "postalCode": "10001",
    "phone": "+12125551234",
    "email": "test@example.com",
    "dateOfBirth": "2025-07-17"
  },
  "order": {
    "date": "2025-07-17",
    "orderId": "ord_789",
    "title": "Product Purchase",
    "siteId": "site_001",
    "name": "John Doe",
    "domainName": "shop.example.com"
  },
  "device": {
    "deviceId": "example_deviceId",
    "fingerprintData": "example_fingerprintData",
    "ip": "192.168.1.1",
    "accept": "text/html,application/json",
    "acceptLanguage": "en-US,en;q=0.9",
    "acceptHeader": "text/html,application/json",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
    "javaEnabled": true,
    "javaScriptEnabled": true,
    "deviceLanguage": "en",
    "colorDepth": "24",
    "screenHeight": "1080",
    "screenWidth": "1920",
    "deviceTimezone": "America/New_York"
  },
  "kycVerified": true,
  "previousPaymentCount": 12345,
  "metadata": {
    "key1": "value1"
  }
}'

#Try It

SandboxTry it
https://sandbox.api.exirom.com/api
Was this helpful?