Create subscription
POST
/v1/subscriptions
Creates a subscription from an existing order. The order provided
in order_id is turned into a recurring charge.
Order prerequisites
- It must exist and belong to the same store as the credentials.
- Payment method must be credit card or PIX.
- Status must be approved or integrated (that is, already cleared by anti-fraud).
The same order can originate more than one subscription.
If a renewal charge is declined, Appmax retries it automatically, following a fixed rule. See Charge retries.
Orders originating from a Shopify checkout
When the order has a linked Shopify cart, products is required and
each item needs shopify_product_id and shopify_variant_id (the price is
read from the variant in Shopify, not from the payload).
- With
intervalprovided, the cadence sent applies to all items. - Without
interval, the cadence comes from the variant's subscription plan and all items must have the same frequency.
Authorizations
bearerAuth
Bearer token of the merchant obtained via POST /oauth2/token using the
merchant's credentials (not the app's). See
Authentication.
Type
HTTP (bearer)
Request Body
application/json
JSON "order_id": 12345, "interval": "month", "interval_count": 1, "max_cycles": 12, "products": [ { "product_id": 55, "quantity": 1 } ], "freight_value": 19.9, "discount": 10
{
}
Responses
Subscription created successfully.
application/json
JSON "data": { "id": 10, "uuid": "6f1c0f1e-6a1c-4a2b-9f0e-3d5c7a9b1234", "status": "active", "subscription_status_id": 1, "interval": "month", "interval_count": 1, "interval_name": "Mensal", "charge_day": 15, "fail_interval_hours": 24, "max_cycles": 12, "completed_cycles": 0, "current_cycle": 1, "next_charge_at": "2026-08-15 00:00:00", "created_at": "2026-07-15 10:00:00", "freight_value": 19.9, "products": [ { "name": "Camiseta Preta", "price": 199.9, "quantity": 1, "product_id": 55, "shopify_product_id": null, "variant_id": null, "sku": "SKU-1", "image_url": null, "compare_at_price": null } ], "customer": { "name": "Maria Silva", "document": "12345678909", "phone": "11999999999", "address": { "country": "BR", "street": "Rua São Bento", "number": "111", "complement": "Bloco 7", "district": "Centro", "city": "São Paulo", "state": "SP", "postcode": "01010000" } }, "payment": { "payment_info": { "brand": "visa", "final": "1234", "expiration": "12/2029" } }, "charges": [ { "cycle": 0, "order_id": 12345, "shopify_order_id": null, "charged_at": "15/07/2026", "value": 209.8, "status": "paid" } ], "panel_url": "https://assinaturas.appmax.com.br/painel/6f1c0f1e-6a1c-4a2b-9f0e-3d5c7a9b1234" }
{
}
POST
/v1/subscriptions