from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
# Basic checkout URL generation
checkout_url = client.checkout.url({
"offering_key": "your_offering_key"
})
# With optional billing interval
checkout_url = client.checkout.url({
"offering_key": "your_offering_key",
"billing_interval": "monthly"
})
# With customer key for pre-filled checkout
checkout_url = client.checkout.url({
"offering_key": "your_offering_key",
"billing_interval": "monthly",
"customer_key": "customer_123"
})
# Using type-safe CheckoutConfig
from metrifox_sdk import CheckoutConfig
checkout_config = CheckoutConfig(
offering_key="your_offering_key",
billing_interval="monthly",
customer_key="customer_123"
)
checkout_url = client.checkout.url(checkout_config)