post https://testapi.payarc.net/v1/subscriptions
This API creates a subscription.
Click to view details about the subscription parameters
1. Customer ID (customer_id
)
customer_id
)- Type:
string
- Description: An ID against which a new subscription will be created.
- Required: Yes
- Format: Alphanumeric
- Note: Provide
customer_id
that was created using the Create a Customer API.
2. Plan ID (plan_id
)
plan_id
)- Type:
string
- Description: An ID against which a new subscription is created.
- Required: Yes
- Format: Alphanumeric and Special Characters
- Note: Provide
plan_id
that was created using the Create a Plan API.
3. Start After Days (start_after_days
)
start_after_days
)- Type:
integer
- Description: Days after which the subscription will start.
- Required: Optional
- Format: Numeric
- Min Value: 1
- Max Value: 365
4. Trial Days (trial_days
)
trial_days
)- Type:
integer
- Description: Number of days until the subscription is under the trial period.
- Required: Optional
- Format: Numeric
- Min Value: 0
- Max Value: 365
- Example:
- Created at: 2021-05-05
- Trial Days: 3
- What it means? Your billing for the subscription will start from 2021-05-08 till the end of the subscription period.
5. End After Cycles (end_after_cycles
)
end_after_cycles
)- Type:
integer
- Description: Number of cycles after which a subscription will end.
- Required: Optional
- Format: Numeric
- Min Value: 1
- Max Value: 999
6. Discount ID (discount_id
)
discount_id
)- Type:
string
- Description: An ID that refers to a coupon when applying to a subscription.
- Required: Optional
- Format: Alphanumeric and Special Characters
- Note: Provide
discount_id
that was created using the Create a Coupon API.
7. Billing Type (billing_type
)
billing_type
)- Type:
integer
- Description: The type of billing applied to a subscription.
- Required: Yes
- Format: Boolean
- Max Length: 1
- Default: 1
- Note:
1
represents billing type is 'Automatic' where you will be charged with the default card on file.0
represents customer billing type is 'Manual' where you will receive a payment link over an email.
8. Payment Due Days (payment_due_days
)
payment_due_days
)- Type:
integer
- Description: Number of days the payment is due after the invoice is sent.
- Required: Conditional
- Format: Numeric
- Min Length: 1 digit
- Max Length: 2 digits
- Example:
3
,23
- Note: This field is required if
billing_type
is 0.
9. Description (description
)
description
)- Type:
string
- Description: An arbitrary string that describes a subscription.
- Required: Optional
- Format: Alphanumeric and Special Characters
- Min Length: 5 characters
- Max Length: 200 characters
- Example:
A1 Company 888-888-8888