curl --request POST \
--url https://api.confiopagos.com/v1/stores/{store}/subscription-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "Premium Monthly Plan",
"amountCents": 5000000,
"description": "Access to all premium features with monthly billing",
"currencyCode": "COP",
"billingCycleFrequency": "MONTHLY",
"billingCycleInterval": 1,
"trialPeriodDays": 7
}
'{
"name": "organizations/01JNRR1NY8MDX4XCGG0N4F06X3/stores/01JNRRDZDPH40DB2YRW329BFXM/subscription-plans/01JNRVWWHH68E76V3TMFFT6GHJ",
"displayName": "Premium Monthly Plan",
"amountCents": 5000000,
"currencyCode": "COP",
"billingCycleFrequency": "MONTHLY",
"billingCycleInterval": 1,
"trialPeriodDays": 7,
"status": "ACTIVE",
"createTime": "2024-01-15T10:30:00Z",
"updateTime": "2024-01-15T10:30:00Z",
"description": "Access to all premium features"
}Create a new recurring subscription plan for your store
curl --request POST \
--url https://api.confiopagos.com/v1/stores/{store}/subscription-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "Premium Monthly Plan",
"amountCents": 5000000,
"description": "Access to all premium features with monthly billing",
"currencyCode": "COP",
"billingCycleFrequency": "MONTHLY",
"billingCycleInterval": 1,
"trialPeriodDays": 7
}
'{
"name": "organizations/01JNRR1NY8MDX4XCGG0N4F06X3/stores/01JNRRDZDPH40DB2YRW329BFXM/subscription-plans/01JNRVWWHH68E76V3TMFFT6GHJ",
"displayName": "Premium Monthly Plan",
"amountCents": 5000000,
"currencyCode": "COP",
"billingCycleFrequency": "MONTHLY",
"billingCycleInterval": 1,
"trialPeriodDays": 7,
"status": "ACTIVE",
"createTime": "2024-01-15T10:30:00Z",
"updateTime": "2024-01-15T10:30:00Z",
"description": "Access to all premium features"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
"01G65Z755AFWAKHE12NY0CQ9FH"
Display name for the subscription plan
1 - 100"Premium Monthly Plan"
Subscription amount in cents
x >= 10005000000
Detailed description of the plan
"Access to all premium features with monthly billing"
Currency code
"COP"
Billing cycle frequency
MONTHLY, WEEKLY "MONTHLY"
Billing cycle interval (e.g., 1 = every month, 3 = every 3 months)
1 <= x <= 121
Trial period in days (0 = no trial)
0 <= x <= 3657
Successfully created subscription plan.
Subscription plan's resource name
"organizations/01JNRR1NY8MDX4XCGG0N4F06X3/stores/01JNRRDZDPH40DB2YRW329BFXM/subscription-plans/01JNRVWWHH68E76V3TMFFT6GHJ"
Display name of the plan
"Premium Monthly Plan"
Amount in cents
5000000
Currency code
"COP"
Billing cycle frequency
BILLING_FREQUENCY_UNSPECIFIED, MONTHLY, WEEKLY "MONTHLY"
Billing cycle interval
1
Trial period in days
7
Plan status
STATUS_UNSPECIFIED, ACTIVE, INACTIVE, ARCHIVED "ACTIVE"
Creation timestamp
"2024-01-15T10:30:00Z"
Last update timestamp
"2024-01-15T10:30:00Z"
Plan description
"Access to all premium features"