LokotroPayConfigs class
Per-checkout configuration for the LokotroPayCheckout widget.
Process-wide concerns — environment, native-pay merchant IDs, etc. — live on LokotroPayConfig and are set once via LokotroPay.init. This class carries only the per-transaction context.
Auth-v3
As of 3.0.0, the sessionToken is a per-checkout credential minted by
your merchant backend via POST /api/v1/internal/sessions/create on the
gateway. The SDK presents it as Authorization: Bearer … on every
/api/v1/payments/* call. The session is bound to the amount, currency,
and customer reference your backend declared at creation time — drift
in any field is a 400 from the gateway.
The legacy token field is retained as a @Deprecated alias forwarding
to sessionToken so existing 2.x integrations compile against 3.x with
a deprecation warning. Will be removed in 4.0.
Constructors
- LokotroPayConfigs({String? sessionToken, @Deprecated('Use sessionToken (Auth-v3). Removed in 4.x.') String? token, Duration? timeout, String acceptLanguage = 'fr', String? googlePayMerchantId, String? googlePayGatewayMerchantId, String? applePayMerchantId})
- Construct with a session token.
Properties
- acceptLanguage → String
-
Accept-Languageheader for this checkout. When null, the SDK usesLokotroPay.instance.config.defaultLocale.final - applePayMerchantId → String?
-
final
- googlePayGatewayMerchantId → String?
-
final
- googlePayMerchantId → String?
-
Per-checkout overrides for native-pay merchant IDs. These fall back to
LokotroPayConfig when null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionToken → String
-
Per-checkout session token. See class docs for the v3 flow.
final
- timeout → Duration?
-
Optional per-checkout HTTP timeout override. When null, the SDK uses
LokotroPay.instance.config.effectiveTimeout.final - token → String
-
@deprecated v2.x alias. Use sessionToken. Removed in 4.x.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited