SubscriptionsAPI

Provides methods for creating, updating, retrieving, searching, and cancelling subscriptions.

Each operation is available as a suspend function for coroutine-based callers and as a callback-based overload for Java or non-coroutine callers.

Functions

Link copied to clipboard

Cancels an active subscription immediately.

fun cancelSubscriptionWith(subscriptionId: String, completionHandler: (Subscription?, NetworkingError?) -> Unit)

Cancels an active subscription immediately and delivers the result via callback.

Link copied to clipboard

Creates a new subscription for a customer.

Creates a new subscription for a customer and delivers the result via callback.

Link copied to clipboard

Retrieves a paginated list of all subscriptions.

Retrieves a paginated list of all subscriptions and delivers the result via callback.

Link copied to clipboard
suspend fun getSubscriptionWith(subscriptionId: String): Pair<Subscription?, NetworkingError?>

Retrieves a single subscription by its unique identifier.

fun getSubscriptionWith(subscriptionId: String, completionHandler: (Subscription?, NetworkingError?) -> Unit)

Retrieves a single subscription by its unique identifier and delivers the result via callback.

Link copied to clipboard
suspend fun searchSubscriptions(status: String?, createdBefore: Int?, createdAfter: Int?): Pair<List<Subscription>?, NetworkingError?>

Searches for subscriptions matching the given filter criteria.

fun searchSubscriptions(status: String?, createdBefore: Int?, createdAfter: Int?, completionHandler: (List<Subscription>?, NetworkingError?) -> Unit)

Searches for subscriptions matching the given filter criteria and delivers the result via callback.

Link copied to clipboard

Updates an existing subscription with the provided fields.

Updates an existing subscription and delivers the result via callback.