#Customers
This part of the API allows you to retrieve and update all your subscribers' information.
#Get a customer
- Route: /customers/:customerId
- Method: GET
Retrieves a customer's information.
⚠️ Some information may not be present in the response depending on the type of subscription attached to the customer.
#Update a customer
- Route: /customers/:customerId
- Method: POST
Updates a customer's information.
⚠️ Some information may not be present in the response depending on the type of subscription attached to the customer.
| Parameters | |
|---|---|
customerId Type: String | Required |
| Body parameters | |
|---|---|
firstName Type: String | First name |
lastName Type: String | Last name |
email Type: String | Email address |
password Type: String | Password |
passwordRepeat Type: String | Required |
#Link an existing subscription to a customer
- Route: /subscribe/customers/:customerId/subscriptions/:gateway/add/external
- Method: POST
Links a subscription that has already been created on your payment gateway
(stripe, paypal, etc. ) to a customer.
| Parameters | |
|---|---|
customerId Type: String | Required |
gateway Type: String | Required |
| Body parameters for Stripe gateway | |
|---|---|
subscriptionId Type: String | Required |
priceId Type: String | Required |
#Switch a subscription to a new offer
- Route: /subscribe/customers/:customerId/subscriptions/:subscriptionId/change
- Method: POST
Switches a customer's subscription to a new offer.
| Parameters | |
|---|---|
customerId Type: String | Required |
subscriptionId Type: String | Required |
| Body parameters | |
|---|---|
offer Type: String | Required |
opts.priceId Type: String | Offer price (ID) |
#Cancel a subscription
- Route: /subscribe/customers/:customerId/subscriptions/:subscriptionId/cancel
- Method: POST
Cancels a customer's subscription
| Parameters | |
|---|---|
customerId Type: String | Required |
subscriptionId Type: String | Required |
#Reactivate a subscription
- Route: /subscribe/customers/:customerId/subscriptions/:subscriptionId/reactivate
- Method: POST
Reactivates a previously canceled customer's subscription