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).
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).