Skip to content

payWithConsent: "cvc is not present which is required by the payment consent" #66

Description

@nguyenthanhphap1413

Environment
SDK: airwallex_payment_flutter (e.g. 0.1.14)
Platform: iOS / Android
Integration: Low-level API — payWithConsent(session, consent)

Use case
We charge a saved card using an existing Payment Consent returned by our backend (getPaymentMethods). Our backend provides (among other fields):
paymentMethodConsentId
consentClientSecret (consent client secret, not the PaymentIntent client secret)
customerId
status
requiresCvc
nextTriggeredBy
Card display metadata: brand, bin, masked cardNumber / last4, expiry, etc.
We create a OneOffSession from a PaymentIntent (intent clientSecret on the session), then call:

await AirwallexPaymentFlutterPlatform.instance.payWithConsent(
session,
PaymentConsent(
id: paymentMethodConsentId,
clientSecret: consentClientSecret,
customerId: customerId,
status: status,
requiresCvc: requiresCvc ?? true,
nextTriggeredBy: nextTriggeredBy, // mapped from backend string
paymentMethod: PaymentMethod(
type: 'card',
customerId: customerId,
card: Card(
bin: bin,
brand: brand,
number: cardNumber, // masked PAN from backend, e.g. ****1234
last4: last4,
name: cardHolderName,
// cvc is intentionally omitted — we do not store CVC
),
),
),
);

Actual behaviour:
PlatformException(-1, cvc is not present which is required by the payment consent cst_hkdmc6j78hinpkwm6q9, null, null)
This occurs when requiresCvc is true (or when our backend indicates CVC is required).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions