stripe_sdk 1.0.0 copy "stripe_sdk: ^1.0.0" to clipboard
stripe_sdk: ^1.0.0 copied to clipboard

outdated

A simple and flexible Stripe API client with complete support for SCA and PSD2.

example/main.dart

import 'dart:async';

import 'package:stripe_sdk/stripe_sdk.dart';

const publishableKey = "my-key";

stripe() async {
  Stripe.init(publishableKey);
  // See Stripe API documentation for details
  final cardData = {};
  await Stripe.instance.createPaymentMethod(cardData);
}

session() {
  CustomerSession.initCustomerSession(
      (apiVersion) => fetchEphemeralKeyFromMyServer(apiVersion));
  CustomerSession.instance.listPaymentMethods();
}

Future<String> fetchEphemeralKeyFromMyServer(String apiVersion) {
  // Send the apiVersion to your server, create the key and return the raw http body.
  return Future.value("Return raw response data");
}
172
likes
0
pub points
90%
popularity

Publisher

unverified uploader

A simple and flexible Stripe API client with complete support for SCA and PSD2.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, uni_links, url_launcher

More

Packages that depend on stripe_sdk