Skip to content

Latest commit

 

History

History
115 lines (90 loc) · 5.55 KB

API.md

File metadata and controls

115 lines (90 loc) · 5.55 KB
title API reference
description Look up SDK methods, HTTP endpoints and return types for synchronous and asynchronous clients.

API reference

Generated from openapi.yaml. Sync and async clients expose the same methods. Pass a Pydantic request/params model or a wire-format dictionary. All methods accept keyword-only options=RequestOptions(...).

checkouts

Method HTTP endpoint Returns
list(params=None) GET /checkouts Page[Checkout]
create(body) POST /checkouts Checkout
get(checkout_id) GET /checkouts/{checkoutId} Checkout

customers

Method HTTP endpoint Returns
list(params=None) GET /customers Page[Customer]
create(body) POST /customers Customer
get(customer_id) GET /customers/{customerId} Customer
update(customer_id, body) PATCH /customers/{customerId} Customer
create_portal_session(customer_id, body) POST /customers/{customerId}/portal-sessions PortalSession
list_subscriptions(customer_id, params=None) GET /customers/{customerId}/subscriptions Page[Subscription]
get_subscription(customer_id, subscription_id) GET /customers/{customerId}/subscriptions/{subscriptionId} Subscription

one_off_products

Method HTTP endpoint Returns
list(params=None) GET /one-off-products Page[OneOffProduct]
create(body) POST /one-off-products OneOffProduct
get(one_off_product_id) GET /one-off-products/{oneOffProductId} OneOffProduct
update(one_off_product_id, body) PATCH /one-off-products/{oneOffProductId} OneOffProduct
archive(one_off_product_id) POST /one-off-products/{oneOffProductId}/archive None
unarchive(one_off_product_id) DELETE /one-off-products/{oneOffProductId}/archive OneOffProduct

subscription_plans

Method HTTP endpoint Returns
list(params=None) GET /subscription-plans Page[SubscriptionPlan]
create(body) POST /subscription-plans SubscriptionPlan
get(subscription_plan_id) GET /subscription-plans/{subscriptionPlanId} SubscriptionPlan
update(subscription_plan_id, body) PATCH /subscription-plans/{subscriptionPlanId} SubscriptionPlan
archive(subscription_plan_id) POST /subscription-plans/{subscriptionPlanId}/archive None
unarchive(subscription_plan_id) DELETE /subscription-plans/{subscriptionPlanId}/archive SubscriptionPlan

orders

Method HTTP endpoint Returns
list(params=None) GET /orders Page[Order]
get(order_id) GET /orders/{orderId} Order
create_invoice_update_link(order_id) POST /orders/{orderId}/invoice-update-link InvoiceUpdateLink
list_refunds(order_id, params=None) GET /orders/{orderId}/refunds Page[Refund]
create_refund(order_id, body) POST /orders/{orderId}/refunds Refund
create_full_refund(order_id, body) POST /orders/{orderId}/refunds/full Refund
get_refund(order_id, refund_id) GET /orders/{orderId}/refunds/{refundId} Refund
cancel_refund(order_id, refund_id) DELETE /orders/{orderId}/refunds/{refundId} None
list_chargebacks(order_id, params=None) GET /orders/{orderId}/chargebacks Page[Chargeback]
get_chargeback(order_id, chargeback_id) GET /orders/{orderId}/chargebacks/{chargebackId} Chargeback

refunds

Method HTTP endpoint Returns
list(params=None) GET /refunds Page[Refund]
get(refund_id) GET /refunds/{refundId} Refund

chargebacks

Method HTTP endpoint Returns
list(params=None) GET /chargebacks Page[Chargeback]
get(chargeback_id) GET /chargebacks/{chargebackId} Chargeback

webhook_events

Method HTTP endpoint Returns
get(event_id) GET /webhook-events/{eventId} WebhookEvent

webhook_endpoints

Method HTTP endpoint Returns
list(params=None) GET /webhook-endpoints Page[WebhookEndpoint]
create(body) POST /webhook-endpoints WebhookEndpoint
get(webhook_endpoint_id) GET /webhook-endpoints/{webhookEndpointId} WebhookEndpoint
update(webhook_endpoint_id, body) PATCH /webhook-endpoints/{webhookEndpointId} WebhookEndpoint
delete(webhook_endpoint_id) DELETE /webhook-endpoints/{webhookEndpointId} None

subscriptions

Method HTTP endpoint Returns
list(params=None) GET /subscriptions Page[Subscription]
get(subscription_id) GET /subscriptions/{subscriptionId} Subscription
update(subscription_id, body) PATCH /subscriptions/{subscriptionId} Subscription
cancel(subscription_id, params=None) DELETE /subscriptions/{subscriptionId} None
create_billing_update_link(subscription_id, body) POST /subscriptions/{subscriptionId}/billing-update-link CreateSubscriptionBillingUpdateLinkResponse
resume(subscription_id) POST /subscriptions/{subscriptionId}/resume Subscription

test_helpers

Method HTTP endpoint Returns
fast_forward_renewal(subscription_id, body) POST /test-helpers/subscriptions/{subscriptionId}/fast-forward-renewal Subscription
simulate_order_payment(order_id, body) POST /test-helpers/orders/{orderId}/simulate-payment Order