Subscription
class Subscription extends Resource implements SubscriptionInterface
Subscriptions allow you to charge a customer on a recurring basis. A subscription ties a customer to a particular plan you've created.
Traits
Properties
string | $id | A unique identifier for the resource. | from Resource |
protected mixed | $response | A response from Stripe. | from Resource |
Methods
Creates a new subscription on an existing customer.
Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.
No description
Details
in Resource at line 29
string
getId()
Returns the unique identifier for this resource.
in Resource at line 39
mixed
getResponse()
Returns the raw Stripe response.
in Resource at line 47
protected void
setProperties()
Set the response data as properties on the class.
in ListAll at line 21
ListAll
listAll(array $arguments = [])
List all the resources.
This will list all of the resources from which this trait belongs to. It will then return itself, so you can method chain it, or reuse the same instantiation.
at line 36
SubscriptionInterface
create(CustomerInterface $customer, SubscriptionBillingTypeInterface $billing, array $items = [], array $arguments = [], string $key = null)
Creates a new subscription on an existing customer.
at line 56
SubscriptionInterface
cancel(string $id)
Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.