Skip to content
Menu

PAYMENT GATEWAY

[THK] C.5.4 Payment Method-Specific Error Domains

Overview

While SPG provides a unified API-level error model, error behavior and interpretation vary significantly depending on the payment method being used.

This section defines the payment method-specific characteristics of error domains, highlighting how different payment methods:

  • produce different types of errors
  • expose different failure conditions
  • require different handling strategies

These differences must be considered together with:

MB WAY

MB WAY errors are strongly influenced by user interaction and mobile device behavior.

Characteristics

  • dependent on user approval in the mobile app
  • sensitive to time constraints (short authorization window)
  • strongly tied to alias validation and device state
  • includes mandate-based flows (authorized payments)

Common Error Patterns

  • invalid or non-existent alias
  • alias duplication or format issues
  • user rejection or non-confirmation
  • timeout during authorization
  • duplicate transaction attempts

Handling Implications

  • user-related errors must not be retried automatically
  • alias-related errors require validation and correction
  • timeout scenarios may require retry with user awareness
  • duplicate scenarios require transaction reconciliation

Operational Considerations

  • flows are inherently asynchronous
  • final outcome must be validated via status inquiry or webhook
  • mandate-related errors require lifecycle-aware handling

Multibanco Reference

Multibanco errors are primarily related to reference generation and lifecycle management.

Characteristics

  • based on generation of payment references
  • strongly dependent on parameter validation
  • involves delayed user payment (asynchronous completion)

Common Error Patterns

  • invalid entity or reference configuration
  • invalid amount, currency, or time window
  • reference already paid or cancelled
  • reference not found

Handling Implications

  • parameterization errors must be corrected before retry
  • lifecycle errors require reconciliation (paid, expired, cancelled)
  • reference generation must be validated before presenting to user

Operational Considerations

  • payment completion occurs outside the system
  • requires status monitoring or webhook processing
  • reference lifecycle must be explicitly managed

Card Payments

Card payment errors are influenced by issuer decisions and authentication flows.

Characteristics

  • dependent on card issuer authorization
  • includes fraud checks and risk evaluation
  • may involve strong customer authentication (e.g., 3DS)
  • supports multi-step flows (AUTH, CAPTURE, REFUND)

Common Error Patterns

  • insufficient funds
  • invalid card details (number, expiry, CVV)
  • card status issues (expired, blocked, cancelled)
  • issuer declines
  • authentication failures

Handling Implications

  • issuer declines must not be retried automatically
  • validation errors must be corrected before retry
  • authentication failures require user re-interaction
  • multi-step operations require state validation before execution

Operational Considerations

  • supports both synchronous and asynchronous flows
  • requires handling of authorization lifecycle
  • reconciliation between AUTH and CAPTURE is critical

Authorized Payments / Recurring Operations

Recurring and authorized payment flows introduce stateful and lifecycle-dependent error conditions.

Characteristics

  • dependent on prior authorization or mandate
  • involve repeated or scheduled operations
  • strongly tied to transaction and mandate state

Common Error Patterns

  • invalid or missing authorization context
  • expired or cancelled authorization
  • invalid token or identification
  • operation not allowed due to state

Handling Implications

  • must validate authorization state before execution
  • must not retry blindly without verifying context
  • requires reconciliation with mandate or token lifecycle

Operational Considerations

  • highly sensitive to state consistency
  • requires strict correlation between operations
  • errors often indicate incorrect lifecycle handling or state misalignment

Cross-Method Differences

Although all payment methods share the same API-level structure, their behavior differs significantly.

DimensionMB WAYMultibancoCard
User InteractionHighLow (offline)Medium
SynchronyAsynchronousAsynchronousMixed
Error SourceUser / DeviceConfiguration / LifecycleIssuer / Network
Retry BehaviorUser-drivenLifecycle-dependentContext-dependent
State SensitivityMediumHighHigh

These differences must be considered when designing integration logic.

Handling Strategy Alignment

Error handling must adapt to the payment method while remaining consistent with the global model:

At the same time:

  • avoid applying uniform retry strategies across methods
  • account for method-specific timing, lifecycle, and dependencies
  • ensure that transaction state is always validated before further actions

Implementation Considerations

Merchant systems must:

  • implement payment method-aware error handling logic
  • adapt retry and validation strategies per method
  • ensure proper synchronization with transaction state
  • handle asynchronous completion consistently
  • integrate error handling with webhook and status mechanisms

Failure to consider payment method differences may result in:

  • incorrect retries
  • invalid transaction flows
  • inconsistent user experience
  • reconciliation issues

Final Consideration

Payment method-specific error domains represent the behavioral layer of SPG error handling.

They complement:

A correct implementation requires combining all these layers while adapting behavior to the specific characteristics of each payment method.

This ensures accurate, reliable, and production-ready handling of all SPG payment scenarios.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.