SubscriptionClient class

It provides methods that mirror endpoints provided by Paystack's Subscriptions API which allows you create and manage recurring payment on your integration.

Inheritance

Constructors

SubscriptionClient.new({String? secretKey})
Create an instance of SubscriptionClient.

Properties

baseUrl String
no setterinherited
client ↔ Client
getter/setter pairinherited
dataAsListKey String
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all({int perPage = 50, int page = 1, String? customer, String? plan}) Future<Response>
Retrieve a list of all subscriptions available on your integration
call(Uri url, HttpMethod method, {NativeJsonData? data, bool dataAsList = false}) Future<Response>
inherited
create(String customer, String plan, String authorization, {String? startDate}) Future<Response>
Create a subscription on your integration
disable(String code, String token) Future<Response>
Disable a subscription on your integration
enable(String code, String token) Future<Response>
Enable a subscription on your integration
fetchOne(String idOrCode) Future<Response>
Retrieve a single subscription on your integration by its id or code
Generate a link for updating the card on a subscription
normalizeQueryParameters(Map<String, dynamic> queryParameters) Map<String, dynamic>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Email a customer a link for updating the card on their subscription
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited