client_stripe 0.1.4 copy "client_stripe: ^0.1.4" to clipboard
client_stripe: ^0.1.4 copied to clipboard

An idiomatic Dart wrapper for the Stripe REST API.

example/example.dart

import 'package:client_stripe/client_stripe.dart';
import 'package:client_stripe/models.dart';

Future<void> main() async {
  final stripe = StripeApiClient(
    apiKey: 'sk_test_123',
    // Runs against: `stripe-mock`
    // https://github.com/stripe/stripe-mock
    baseUri: Uri.parse('http://localhost:12111'),
  );
  final customer = await stripe.v1.customers.retrieve(customer: 'cus_test_123');
  switch (customer) {
    case Customer():
      print('Found customer: $customer');
    case DeletedCustomer():
      print('Customer was deleted');
  }
}
7
likes
150
points
115
downloads

Publisher

verified publishercelest.dev

Weekly Downloads

An idiomatic Dart wrapper for the Stripe REST API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause-Patent (license)

Dependencies

clock, convert, cross_file, crypto, http, http_parser, libcoder, logging, meta

More

Packages that depend on client_stripe