Plans
A plan is a template that defines the terms of a subscription, such as price, billing frequency, and duration. Before you can create a subscription for a customer, you must first set up at least one plan.
Featuresβ
Authentication and Security
To access the API, it is necessary to authenticate each request with a token, see Authentication.
π Create a planβ
- Base URL:
https://api-sandbox.n1co.shop - Method:
POST - Endpoint:
/api/v3/Plans - Description: Creates a new subscription plan.
- Required Headers:
Content-Type: application/jsonAuthorization: Bearer {your_token}- Example:
- Request
- Response
{
"name": "Expert Family Plan",
"description": "Plan for 2 students with full access",
"amount": 499,
"customFields": [
{
"label": "SAVE 10 MONTHS",
"name": "savings_label",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": ""
},
{
"label": "Professional and updated content with digital certificates",
"name": "feature_content_digital",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Physical certificates for professional learning paths",
"name": "feature_physical_certificates",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Access to Startups, English, and leadership schools",
"name": "feature_special_schools",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Exclusive events like Platzi Conf",
"name": "feature_exclusive_events",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Download content on the mobile app",
"name": "feature_mobile_download",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
}
],
"billingCycleType": "Year",
"billingCyclesNumber": 1,
"cyclesToBillBeforeAllowCancelation": null,
"termsAndConditions": "Annual family plan for 2 students. Save $589 vs 2 monthly plans for 12 months.",
"subscriberLimit": null,
"enrollmentEndDate": null,
"subscriptionEndDate": null,
"billingDay": null,
"locationId": 578
}
{
"planId": 1810,
"name": "Expert Family Plan",
"description": "Plan for 2 students with full access",
"endDate": null,
"cyclesToBillBeforeAllowCancelation": null,
"subscriberLimit": null,
"enrollmentEndDate": null,
"billingCyclesNumber": 1,
"billingCycleType": "Year",
"termsAndConditions": "Annual family plan for 2 students. Save $589 vs 2 monthly plans for 12 months.",
"activeSubscriptionsCount": 0,
"inactiveSubscriptionsCount": 0,
"paymentLink": {
"created": "2025-11-10T20:12:35.0298964Z",
"code": "o8WNfWK",
"linkUrl": "https://pay.h4b.dev/pl/o8WNfWK",
"expirationDateTime": null,
"amount": 499.0000,
"isActive": true,
"maxSales": null,
"customFields": [
{
"label": "SAVE 10 MONTHS",
"name": "savings_label",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": ""
},
{
"label": "Professional and updated content with digital certificates",
"name": "feature_content_digital",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Physical certificates for professional learning paths",
"name": "feature_physical_certificates",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Access to Startups, English, and leadership schools",
"name": "feature_special_schools",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Exclusive events like Platzi Conf",
"name": "feature_exclusive_events",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Download content on the mobile app",
"name": "feature_mobile_download",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
}
]
},
"billingDay": null,
"locationId": 578,
"createdBy": "c8573b9a-88ea-45b6-aef4-4817440f2cc9",
"currencyCode": "USD",
"locale": "es-SV",
"isActive": true
}
Request Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | β | Name of the subscription plan |
description | string | β | Description of the subscription plan |
amount | decimal | β | Price set for the subscription plan |
customFields | array of objects | β | Allows configuring custom fields for the plan, it is optional |
customFields[].label | string | β | A value is required for each custom field |
customFields[].name | string | β | A name is required and must be unique for each custom field |
customFields[].placeholder | string | β | Can be used for an input field |
customFields[].isRequired | boolean | β | Can be used for an input field |
customFields[].isVisible | boolean | β | Can be used for an input field |
customFields[].isEditable | boolean | β | Can be used for an input field |
customFields[].defaultValue | string | β | Allows assigning a default value |
billingCycleType | string | β | Type of billing cycle: Day, Week, Month, Year |
billingCyclesNumber | integer | β | Billing frequency according to billingCycleType (e.g., 2 days, 3 months, 1 year) |
cyclesToBillBeforeAllowCancelation | integer | β | Number of mandatory periods before allowing cancellation. Send null if not applicable |
termsAndConditions | string | β | Allows indicating the terms and conditions for the plan |
subscriberLimit | integer | β | Subscriber limit for the plan. Send null for unlimited |
enrollmentEndDate | datetime | β | Deadline to accept new subscribers (ISO 8601 format). After this date, no more subscribers will be accepted. Can be null |
subscriptionEndDate | datetime | β | Subscription end date (ISO 8601 format). Upon reaching this date, the subscription becomes inactive and no further charges will be made. Can be null |
billingDay | integer | β | Specific day of the month to make the charge (only for monthly subscriptions). Values: 1-27 or 31. Can be null |
locationId | integer | β | ID of the branch to which the plan will be associated. Obtained from Portal β Settings β Branches |
billingCycleType Values
Accepted values are:
Day- Daily cycleWeek- Weekly cycleMonth- Monthly cycleYear- Annual cycle
Billing Day
The billingDay parameter only applies when billingCycleType is Month. For other cycle types, it must be sent as null.
π Query the details of a planβ
- Base URL:
https://api-sandbox.n1co.shop - Method:
GET - Endpoint:
/api/v3/Plans/{planId} - Description: Gets the information of a subscription plan.
- Required Headers:
Authorization: Bearer {your_token}- Response Example:
- Response
{
"planId": 1807,
"name": "Plan Basic 01",
"description": "Monthly plan for 1 student",
"endDate": null,
"cyclesToBillBeforeAllowCancelation": null,
"subscriberLimit": null,
"enrollmentEndDate": null,
"billingCyclesNumber": 1,
"billingCycleType": "Month",
"termsAndConditions": "Recurring monthly charge. You can cancel at any time.",
"activeSubscriptionsCount": 0,
"inactiveSubscriptionsCount": 0,
"paymentLink": {
"created": "2025-11-10T20:12:18.2824468Z",
"code": "OjYjhP8",
"linkUrl": "https://pay.h4b.dev/pl/OjYjhP8",
"expirationDateTime": null,
"amount": 39.0000,
"isActive": true,
"maxSales": null,
"customFields": [
{
"label": "Professional and updated content with digital certificates",
"name": "feature_content_digital",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Physical certificates for professional learning paths",
"name": "feature_physical_certificates",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "not_included"
},
{
"label": "Access to Startups, English, and leadership schools",
"name": "feature_special_schools",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "not_included"
},
{
"label": "Exclusive events like Platzi Conf",
"name": "feature_exclusive_events",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "not_included"
},
{
"label": "Download content on the mobile app",
"name": "feature_mobile_download",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "not_included"
}
]
},
"billingDay": 1,
"locationId": 578,
"createdBy": "c8573b9a-88ea-45b6-aef4-4817440f2cc9",
"currencyCode": "USD",
"locale": "es-SV",
"isActive": true
}
π Query all created plansβ
- Base URL:
https://api-sandbox.n1co.shop - Method:
GET - Endpoint:
/api/v3/Plans/all - Description: Gets the details of all created plans.
- Required Headers:
Authorization: Bearer {your_token}- Response Example:
- Response
[
{
"planId": 1809,
"name": "Expert Plan",
"description": "Plan for 1 student with full access",
"endDate": null,
"cyclesToBillBeforeAllowCancelation": null,
"subscriberLimit": null,
"enrollmentEndDate": null,
"billingCyclesNumber": 1,
"billingCycleType": "Year",
"termsAndConditions": "Annual plan. Save $343 compared to 12 months of the monthly plan.",
"activeSubscriptionsCount": 0,
"inactiveSubscriptionsCount": 0,
"paymentLink": {
"created": "2025-11-10T20:12:30.7746804Z",
"code": "Awp8s5B",
"linkUrl": "https://pay.h4b.dev/pl/Awp8s5B",
"expirationDateTime": null,
"amount": 249.0000,
"isActive": true,
"maxSales": null,
"customFields": [
{
"label": "SAVE 7 MONTHS",
"name": "savings_label",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": ""
},
{
"label": "Professional and updated content with digital certificates",
"name": "feature_content_digital",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Physical certificates for professional learning paths",
"name": "feature_physical_certificates",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Access to Startups, English, and leadership schools",
"name": "feature_special_schools",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Exclusive events like Platzi Conf",
"name": "feature_exclusive_events",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
},
{
"label": "Download content on the mobile app",
"name": "feature_mobile_download",
"placeholder": "",
"isRequired": false,
"isVisible": false,
"isEditable": false,
"defaultValue": "included"
}
]
},
"billingDay": null,
"locationId": 578,
"createdBy": "c8573b9a-88ea-45b6-aef4-4817440f2cc9",
"currencyCode": "USD",
"locale": "es-SV",
"isActive": true
}
]
π Query the subscriptions of a planβ
- Base URL:
https://api-sandbox.n1co.shop - Method:
GET - Endpoint:
/api/v3/Plans/{planId}/Subscriptions - Description: Gets the information of all subscriptions for a plan.
- Required Headers:
Authorization: Bearer {your_token}- Response Example:
- Response
[
{
"subscriptionId": 480,
"planId": 1544,
"name": "ePay Plan",
"description": "ePay subscription description",
"created": "2025-10-15T21:36:26.9682946Z",
"amount": 45.9900,
"amountFormatted": "$45.99",
"billingCycle": 1,
"billingCycleType": "Month",
"currencyCode": "USD",
"locale": "es-SV",
"currentPeriodStart": "2025-10-16T21:36:26.7660968Z",
"currentPeriodEnd": "2025-11-16T21:36:26.7660968Z",
"timezone": "America/El_Salvador",
"subscriptionStatus": "Active",
"customer": {
"name": "Carlos DΓΊran",
"email": "[email protected]",
"phone": "+50364331900",
"paymentMethodName": "TEST 001",
"paymentMethodCardBrand": "visa",
"paymentMethodBin": "400000",
"paymentMethodLastDigits": "2701",
"backupPaymentMethodName": "TEST 002",
"backupPaymentMethodCardBrand": "visa",
"backupPaymentMethodBin": "424242",
"backupPaymentMethodLastDigits": "4242"
}
}
]
π Query all customers associated with a planβ
- Base URL:
https://api-sandbox.n1co.shop - Method:
GET - Endpoint:
/api/v3/Plans/{planId}/customers - Description: Gets all customers of a subscription plan.
- Required Headers:
Authorization: Bearer {your_token}- Response Example:
- Response
[
{
"subscriptionId": 467,
"planId": 576,
"subscriptionStatus": "Inactive",
"enrollmentDate": "2025-09-04T23:08:49.9261083Z",
"currentPeriodStart": "2025-09-05T23:08:49.6377287Z",
"currentPeriodEnd": "2025-10-05T23:08:49.6377287Z",
"subscriptionOrdersCount": 2,
"customer": {
"name": "Carlos DΓΊran",
"email": "[email protected]",
"phone": "+50364331900",
"paymentMethodName": "TEST 001",
"paymentMethodCardBrand": "visa",
"paymentMethodBin": "400000",
"paymentMethodLastDigits": "2701",
"backupPaymentMethodName": "TEST 002",
"backupPaymentMethodCardBrand": "visa",
"backupPaymentMethodBin": "424242",
"backupPaymentMethodLastDigits": "4242"
}
},
{
"subscriptionId": 474,
"planId": 576,
"subscriptionStatus": "Active",
"enrollmentDate": "2025-09-25T21:41:03.4362415Z",
"currentPeriodStart": "2025-09-26T21:41:03.1469338Z",
"currentPeriodEnd": "2025-10-26T21:41:03.1469338Z",
"subscriptionOrdersCount": 2,
"customer": {
"name": "Sandra Elizabeth MartΓnez",
"email": "[email protected]",
"phone": "+50774331002",
"paymentMethodName": "TEST 003",
"paymentMethodCardBrand": "visa",
"paymentMethodBin": "500000",
"paymentMethodLastDigits": "3001",
"backupPaymentMethodName": "TEST 004",
"backupPaymentMethodCardBrand": "visa",
"backupPaymentMethodBin": "222201",
"backupPaymentMethodLastDigits": "5589"
}
}
]