Payments API Concepts

Understand payment gateway integration — how partners participate in real-time transaction authorization via webhooks.

Payments API Concepts

The Payments API enables partners to act as payment gateway providers — participating in real-time transaction authorization by responding to webhook events. Unlike payment currencies (where mCards evaluates balances directly), payment gateways give the partner active control over authorization decisions.


Payment Gateways

A payment gateway represents a partner's payment processing capability on the mCards platform. Each gateway:

  • Has a unique identifier (payment_gateway_uuid)
  • Has a status (active or inactive)
  • Is associated with one or more distributor cards (card programs)
  • May have an operations account for settlement tracking
  • May provide an onboarding URL for cardholder enrollment

Payment Accounts

A payment account links a specific cardholder card to a payment gateway. Payment accounts are created when cardholders enroll with a payment provider and represent the relationship between:

  • The cardholder's card
  • The partner's payment gateway
  • The cardholder's account with the payment provider

Payment accounts have:

PropertyDescription
Statusactive, inactive, or other lifecycle states
Available balanceFunds available for authorization (maintained by the partner)
Current balanceTotal account balance

Authorization Flow

When a cardholder makes a purchase, the Dynamic Processing Engine (DPE) evaluates payment accounts in rank order. For payment gateway accounts, the flow is:

  1. Authorization request — mCards receives the request from the card network
  2. DPE evaluation — The DPE identifies the payment gateway account and sends an authorization webhook to the partner
  3. Partner decision — The partner receives the webhook and responds with an approval or decline
  4. Transaction completion — mCards relays the decision to the card network

Webhook Event Types

Payment gateway authorization uses several webhook event types:

EventDescription
payment.holdAuthorization hold — partner should reserve funds
payment.captureCapture — partner should finalize the transaction
payment.release_holdRelease — partner should release a previous hold
payment.hold_and_captureCombined hold and capture in a single message
payment.get_balanceBalance inquiry — partner should return current balance

See Webhooks API Concepts for delivery details and signature verification.


Comparison: Payment Gateways vs Payment Currencies

Payment Gateways (Payments API)Payment Currencies (Currency API)
Partner roleActive — approves or declines via webhookPassive — provides balance data only
Real-time decisioningYes — partner responds to each authorizationNo — mCards evaluates balance directly
Webhook involvementRequired — payment.* eventsNone during authorization
Use casePartner-controlled payment processingBalance-based value (loyalty, rewards as payment)

DPE Rank Order and Payment Gateways

When a cardholder's card has multiple payment accounts, the DPE evaluates them in rank order. For payment gateway accounts, this means:

  1. The DPE reaches the gateway's payment account in the rank sequence
  2. An authorization webhook (payment.hold) is sent to the gateway partner
  3. The partner evaluates the request and responds with approve or decline
  4. If declined, the DPE moves to the next payment account in rank order

A single cardholder card may have payment accounts from multiple gateways and/or currencies. The rank order determines which is tried first, second, etc. See Platform Integration Concepts for the full DPE evaluation flow.


Syndicated Distributor Cards

Payment gateways are linked to distributor cards (card programs) through syndication. A gateway's payment_gateway_syndicated_distributor_cards field lists the card programs that can use this gateway for authorization.

Syndication determines:

  • Which cardholders can use the gateway — Only cardholders with cards issued under a syndicated card program have payment accounts with the gateway
  • Rank order — The gateway's position in the DPE evaluation sequence for each syndicated card program
  • Scope of access — A gateway may be syndicated to one card program or many, depending on the business relationship

Operations Accounts

Each payment gateway may have an associated operations account used for:

  • Settlement tracking
  • Balance reconciliation
  • Financial integrity across the platform

Related Guides