logout static method

Future logout(
  1. String merchantId
)

Logs out merchantId: revokes the cached session if it's still valid and clears it. The callback stays registered, so the next request fetches a new token.

Sessions expire on their own, but end them explicitly when the merchant's session ends in your app.

A PayEngine widget that is still on screen keeps the token its page already holds until that token expires. Remove such widgets before logging out.

See PayEngine Merchant Session.

await PayEngineNative.logout(merchantId);

Implementation

static Future logout(String merchantId) async {
  await _channel.invokeMethod("logout", {
    "merchantId": merchantId,
  });
}