Choose one authoritative total at submission

Calculate the final order total in the order system with the currency, tax, shipping, and discounts applied. Pass that amount to the gateway in the unit its API expects. Some providers expect integer minor units and describe special cases for specific currencies or operations.

Preserve currency alongside every amount

Store the amount and currency on the order, payment attempt, and refund. Use integer minor units or decimal arithmetic with explicit rounding rules for money calculations. Avoid treating decimal display values, order totals, and the provider’s API amount as interchangeable.

Resolve a mismatch before shipping the order

Compare the amount and currency reported by the gateway with what the order expected. Flag discrepancies for review, especially after promotions, cart changes, or a currency switch. Use the same references when finance reconciles a payout or refunds part of the order.

Build a representative amount matrix

  • Standard purchase with tax and shipping.
  • Order with a discount distributed across multiple lines.
  • Partial refund and remaining balance.
  • Nondefault currency and any special units in the approved provider setup.

Sources and further reading

Ready to share your business details?

Start an application or contact Lunar Payments about your setup.

Start application Contact us