6.6 KiB
6.6 KiB
Billing
Overview
Available Operations
attach
Example Usage
from autumn_sdk import Autumn
with Autumn(
x_api_version="2.1",
secret_key="<YOUR_BEARER_TOKEN_HERE>",
) as autumn:
res = autumn.billing.attach(product_id="<id>", redirect_mode="always")
# Handle response
print(res)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id |
str | ✔️ | N/A |
entity_id |
OptionalNullable[str] | ➖ | N/A |
entity_data |
Optional[models.EntityData] | ➖ | N/A |
options |
List[models.Options] | ➖ | N/A |
version |
Optional[float] | ➖ | N/A |
free_trial |
OptionalNullable[models.AttachFreeTrial] | ➖ | N/A |
items |
List[models.AttachItem] | ➖ | N/A |
invoice |
Optional[bool] | ➖ | N/A |
enable_product_immediately |
Optional[bool] | ➖ | N/A |
finalize_invoice |
Optional[bool] | ➖ | N/A |
redirect_mode |
Optional[models.RedirectMode] | ➖ | N/A |
success_url |
Optional[str] | ➖ | N/A |
new_billing_subscription |
Optional[bool] | ➖ | N/A |
plan_schedule |
Optional[models.PlanSchedule] | ➖ | N/A |
billing_behavior |
Optional[models.BillingBehavior] | ➖ | N/A |
adjustable_quantity |
Optional[bool] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.AutumnDefaultError | 4XX, 5XX | */* |