I am using square to create a subscription model. I have created plan and item. I have followed the Youtube video on How to create Subscriptions and there it was instructed to create an Order and get the id from there. But I am receiving the below error:
Create subscription result: <ApiResponse {"errors": [{"code": "BAD_REQUEST","detail": "Subscription cannot have both a top-level order template id and phases.","category": "INVALID_REQUEST_ERROR"}]}
Here’s my payload for reference as well
subscription_body: {'location_id': 'my-location-id', 'customer_id': '98MX7M8P10JWJ18F24J1703PMW', 'idempotency_key': 'fd5eafc4-53d0-4074-8f50-f457de13e48a', 'order_template_id': 'Xap9Ff0bDt9lvqhUu6twhOI6yZ4F', 'source': {'name': 'BC7YR4URYBJCD7RFK4PS2N2H'}, 'phases': [{'ordinal': 0, 'order_template_id': 'Xap9Ff0bDt9lvqhUu6twhOI6yZ4F'}], 'plan_variation_id': 'BC7YR4URYBJCD7RFK4PS2N2H'}
5 posts - 2 participants