Card
paymentType: "CARD".
This page covers what's specific to the Card tab of <swirepay-checkout>. For the shared
integration flow, props reference, error/success payloads, theming, and testing, see
SDK setup & flow; for minting the
checkout session, see Checkout session.
Behavior
- Card number, expiry, and CVC are validated and formatted automatically by the widget (brand
detection, Luhn check, dynamic CVC length for Amex vs. others) — there is nothing to configure
for this. Validation failures on these fields are shown inline and never reach
errorCallback. - Supports both one-time payment and inventory-order scope — see Checkout session. Card is one of only two methods (with ACH) that supports inventory-order checkouts.
save-payment-method/pay-through-saved-methodfully supported — see Prop interactions.
Pitfalls
save-payment-methodwithoutcustomer-gid— the element renders a hard error; a saved payment method must always be attached to a known customer.- Treating
pay-through-saved-methodparse failures, or a declined saved-method charge, as recoverable — they are not; there's no form left to fix them from. Validate the JSON before setting the attribute.
See SDK setup & flow → Common pitfalls for pitfalls that apply across all payment methods.