Example
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a -G \-d clientId="<your client id>" \-d clientSecret="<your client secret>"
Parameters | |
---|---|
customerId Type: String | Required |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a -G \-d clientId="<your client id>" \-d clientSecret="<your client secret>"
{ "id": "627e5c10e04d6671b9aa937a", "updatedAt": "2022-05-19T15:52:32.911Z", "createdAt": "2022-05-13T13:24:32.641Z", "sandbox": false, "externalId": "627e5c11cf611adcdf27d80b", "external": true, "lastSignin": "2022-05-13T13:24:32.641Z", "locale": "fr", "lastName": "dupont", "firstName": "françois", "username": "fdupont@provider.fr", "email": "fdupont@provider.fr", "stripe": { "id": "cus_LhTlgl0DfwdE9u" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, "subscription": { "id": "62825e0f51531d3d352c63a2", "updatedAt": "2022-05-16T14:22:12.264Z", "gateway": "stripe", "status": "active", "renewal": "automatic", "renewedAt": "2022-05-16T14:22:07.097Z", "createdAt": "2022-05-16T14:05:54.327Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202400e76efa9210a2786e4", "price": 1100, "slug": "offre_starter", "name": "offre starter" }, "owner": "627e5c10e04d6671b9aa937a" }}
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 |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a \-X POST \-H "Content-Type: application/json" \-d \"{ \"firstName\": \"John\", \"lastName\": \"Doe\", \"clientId\": \"<your client id>\", \"clientSecret\": \"<your client secret>\"}"
{ "id": "627e5c10e04d6671b9aa937a", "updatedAt": "2022-05-19T15:52:32.911Z", "createdAt": "2022-05-13T13:24:32.641Z", "sandbox": false, "externalId": "627e5c11cf611adcdf27d80b", "external": true, "lastSignin": "2022-05-13T13:24:32.641Z", "locale": "fr", "lastName": "doe", "firstName": "john", "username": "fdupont@provider.fr", "email": "fdupont@provider.fr", "stripe": { "id": "cus_LhTlgl0DfwdE9u" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, "subscription": { "id": "62825e0f51531d3d352c63a2", "updatedAt": "2022-05-16T14:22:12.264Z", "gateway": "stripe", "status": "active", "renewal": "automatic", "renewedAt": "2022-05-16T14:22:07.097Z", "createdAt": "2022-05-16T14:05:54.327Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202400e76efa9210a2786e4", "price": 1100, "slug": "offre_starter", "name": "offre starter" }, "owner": "627e5c10e04d6671b9aa937a" }}
Parameters | |
---|---|
customerId Type: String | Required |
gateway Type: String | Required |
Body parameters for Stripe gateway | |
---|---|
subscriptionId Type: String | Required |
priceId Type: String | Required |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a/subscriptions/stripe/add/external \-X POST \-H "Content-Type: application/json" \-d \"{ \"subscriptionId\": \"sub_1L1VX9DLuAtgK44fr82uvrZz\", \"priceId\": \"price_1KQqYEDLuAtgK44ffEcFhtsP\", \"clientId\": \"<your client id>\", \"clientSecret\": \"<your client secret>\"}"
{ "id": "627e5c10e04d6671b9aa937a", "updatedAt": "2022-05-20T13:09:11.484Z", "createdAt": "2022-05-13T13:24:32.641Z", "sandbox": false, "externalId": "627e5c11cf611adcdf27d80b", "external": true, "lastSignin": "2022-05-13T13:24:32.641Z", "locale": "fr", "lastName": "Doe", "firstName": "John", "username": "fdupont@provider.fr", "email": "fdupont@provider.fr", "stripe": { "id": "cus_LixSMk8dQyach2" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, "subscription": { "id": "628792f6c5c5e12cbe9be8fd", "updatedAt": "2022-05-20T13:09:11.161Z", "renewedAt": "2022-05-20T13:09:11.160Z", "gateway": "stripe", "status": "active", "createdAt": "2022-05-20T09:33:04.734Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202400e76efa9210a2786e4", "createdAt": "2022-02-08T10:03:58.207Z", "stripe": { "priceId": "price_1KQqYEDLuAtgK44ffEcFhtsP", "productId": "prod_L74hJahNMWUVxk" }, "advantages": [ "avantage 1", "avantage 2" ], "archived": false, "taxRate": 20, "currency": "eur", "price": 1100, "slug": "offre_starter", "name": "offre starter" }, "owner": "627e5c10e04d6671b9aa937a" }}
Parameters | |
---|---|
customerId Type: String | Required |
subscriptionId Type: String | Required |
Body parameters | |
---|---|
offer Type: String | Required |
opts.priceId Type: String | Offer price (ID) |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a/subscriptions/628792f6c5c5e12cbe9be8fd/change \-X POST \-H "Content-Type: application/json" \-d \"{ \"offer\": \"premium-offer\", \"opts\": \"{\"price\":\"price_id\"}\", \"clientId\": \"<your client id>\", \"clientSecret\": \"<your client secret>\"}"
{ "subscription": { "id": "6287995c604e316f47c3b21e", "updatedAt": "2022-05-20T13:39:37.316Z", "gateway": "stripe", "status": "active", "renewal": "automatic", "renewedAt": "2022-05-20T13:36:28.503Z", "createdAt": "2022-05-20T13:32:52.613Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202402a76efa9210a2786e6", "createdAt": "2022-02-08T10:04:26.546Z", "stripe": { "priceId": "price_1KQqYhDLuAtgK44fXxHa9l7J", "productId": "prod_L74iEBYPVYWbq0" }, "advantages": [ "les avantages de 'starter'", "avantage 3" ], "archived": false, "taxRate": 20, "currency": "eur", "price": 1500, "slug": "offre_standard", "name": "offre standard" }, "nextOffer": { "id": "6202400e76efa9210a2786e4", "createdAt": "2022-02-08T10:03:58.207Z", "stripe": { "priceId": "price_1KQqYEDLuAtgK44ffEcFhtsP", "productId": "prod_L74hJahNMWUVxk" }, "advantages": [ "avantage 1", "avantage 2" ], "archived": false, "taxRate": 20, "currency": "eur", "price": 1100, "slug": "offre_starter", "name": "offre starter" }, "owner": { "id": "6287922bc5c5e12cbe9be8fa", "locale": "FR", "lastName": "Doe", "firstName": "John", "username": "john.doe@provider.fr" "email": "john.doe@provider.fr", "stripe": { "id": "cus_LixwgIeOg5Q1Py" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, } }}
Parameters | |
---|---|
customerId Type: String | Required |
subscriptionId Type: String | Required |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a/subscriptions/628792f6c5c5e12cbe9be8fd/cancel \-X POST \-H "Content-Type: application/json" \-d \"{ \"clientId\": \"<your client id>\", \"clientSecret\": \"<your client secret>\"}"
{ "subscription": { "id": "6287995c604e316f47c3b21e", "updatedAt": "2022-05-20T14:03:38.272Z", "gateway": "stripe", "status": "canceled", "renewal": "automatic", "renewedAt": "2022-05-20T13:36:28.503Z", "createdAt": "2022-05-20T13:32:52.613Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202402a76efa9210a2786e6", "createdAt": "2022-02-08T10:04:26.546Z", "stripe": { "priceId": "price_1KQqYhDLuAtgK44fXxHa9l7J", "productId": "prod_L74iEBYPVYWbq0" }, "advantages": [ "les avantages de 'starter'", "avantage 3" ], "archived": false, "taxRate": 20, "currency": "eur", "price": 1500, "slug": "offre_standard", "name": "offre standard" }, "nextOffer": null, "owner": { "id": "6287922bc5c5e12cbe9be8fa", "locale": "FR", "firstName": "maxime", "username": "maximed4@poool.fr", "email": "maximed4@poool.fr", "stripe": { "id": "cus_LixwgIeOg5Q1Py" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, } }}
Parameters | |
---|---|
customerId Type: String | Required |
subscriptionId Type: String | Required |
curl https://api.poool.fr/api/v3/subscribe/customers/627e5c10e04d6671b9aa937a/subscriptions/628792f6c5c5e12cbe9be8fd/reactivate \-X POST \-H "Content-Type: application/json" \-d \"{ \"clientId\": \"<your client id>\", \"clientSecret\": \"<your client secret>\"}"
{ "subscription": { "id": "6287995c604e316f47c3b21e", "updatedAt": "2022-05-20T14:07:15.512Z", "gateway": "stripe", "status": "active", "renewal": "automatic", "renewedAt": "2022-05-20T13:36:28.503Z", "createdAt": "2022-05-20T13:32:52.613Z", "endAt": "2022-06-16T14:22:07.097Z", "nextRenewal": "2022-06-16T14:22:07.097Z", "sandbox": false, "interval": "monthly", "active": true, "offer": { "id": "6202402a76efa9210a2786e6", "createdAt": "2022-02-08T10:04:26.546Z", "stripe": { "priceId": "price_1KQqYhDLuAtgK44fXxHa9l7J", "productId": "prod_L74iEBYPVYWbq0" }, "advantages": [ "les avantages de 'starter'", "avantage 3" ], "archived": false, "taxRate": 20, "currency": "eur", "price": 1500, "slug": "offre_standard", "name": "offre standard" }, "nextOffer": null, "owner": { "id": "6287922bc5c5e12cbe9be8fa", "locale": "FR", "firstName": "maxime", "username": "maximed4@poool.fr", "email": "maximed4@poool.fr", "stripe": { "id": "cus_LixwgIeOg5Q1Py" }, "paymentMethod": { "type": "card", "number": "4242", "expMonth": 11, "expYear": 2022, "brand": "visa", "paymentMethodId": "pm_1L1VX9DLuAtgK44f7Z0Z0Z0Z", }, } }}