Skip to main content
POST
Create subscription

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

store
string
required
Example:

"01G65Z755AFWAKHE12NY0CQ9FH"

plan
string
required
Example:

"01JNRVWWHH68E76V3TMFFT6GHJ"

Body

application/json
buyer
object
required
correlationId
string

Your internal subscription/order ID for tracking and correlation. Use this to match Confío subscriptions with your system's records.

Maximum string length: 128
Example:

"36285414"

firstChargeAmountCents
number

Optional first charge amount in cents (only for the first charge)

Required range: x >= 0
Example:

3000000

redirectUri
string<uri>

Optional redirect URI after subscription payment

Example:

"https://example.com/subscription-status"

acceptanceExpireTime
string<date-time>

Optional moment after which the subscription can no longer be accepted. Must be between 1 hour and 30 days from creation. Defaults to 7 days from creation.

Example:

"2024-01-22T10:30:00Z"

Response

200 - application/json

Successfully created subscription.

name
string
required

Subscription's resource name

Example:

"stores/01JNRRDZDPH40DB2YRW329BFXM/subscription-plans/01JNRVWWHH68E76V3TMFFT6GHJ/subscriptions/01JNRVWWHH68E76V3TMFFT6GHJ"

status
enum<string>
required

Subscription status

Available options:
PENDING_ACCEPTANCE,
ACTIVE,
PROCESSING,
TRIALING,
PAST_DUE,
CANCELED,
EXPIRED,
SUSPENDED
Example:

"PENDING_ACCEPTANCE"

buyer
object
required

Buyer information

createTime
string
required

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

correlationId
string

Your internal subscription/order ID, as provided when the subscription was created.

Example:

"36285414"

firstChargeAmountCents
number

Optional first charge amount in cents (only for the first charge)

Example:

3000000

redirectUri
string<uri>

Optional redirect URI after subscription payment

Example:

"https://example.com/subscription-status"

acceptanceUrl
string

URL for buyer to accept the subscription (only available when status is PENDING_ACCEPTANCE)

Example:

"https://checkout.confiopagos.com/s/abc123token"

acceptanceExpireTime
string

Moment after which the subscription can no longer be accepted. Only meaningful while the status is PENDING_ACCEPTANCE.

Example:

"2024-01-22T10:30:00Z"

currentPeriodStart
string

Start of current billing period

Example:

"2024-01-15T10:30:00Z"

currentPeriodEnd
string

End of current billing period

Example:

"2024-02-15T10:30:00Z"

nextBillingTime
string

Next billing date

Example:

"2024-02-15T10:30:00Z"