How do I implement the subscription creation API?

Hello admin.
My name is Noriaki.

In a test environment, I’m using the Create subscription API to fill in the fields correctly to allow customers to subscribe to a specific product,

but I’m getting the following error message,
so perhaps I’m following the wrong procedure with the Create Order API.

{
  "errors": [
    {
      "code": "BAD_REQUEST",
      "detail": "The order template amount must be at within the limits, low: 1, high: 9999999.",
      "category": "INVALID_REQUEST_ERROR"
    }
  ]
}

I’m checking the official YouTube channel and documents while I’m typing this,

but I’m not sure if it’s correct. Could you provide a detailed flow chart showing the steps to get customers to subscribe to a specific product?

I’m sorry to bother you during your busy schedule, but I would appreciate your help.

●Sandbox Application ID
sandbox-sq0idb-BlXwMTyiLXbQLywJXKmNlA

The order your using only has a service charge with no line items. If you create an order that has line_items it will work. For example:

curl https://connect.squareupsandbox.com/v2/orders \
  -X POST \
  -H 'Square-Version: 2025-01-23' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "{UNIQUE_KEY}",
    "order": {
      "location_id": "LE40N37TVF5FT",
      "state": "DRAFT",
      "line_items": [
        {
          "quantity": "1",
          "catalog_object_id": "KAQJXCONWUSBWPHR62W3DZTO"
        }
      ],
      "discounts": [
        {
          "catalog_object_id": "5PFBH6YH5SB2F63FOIHJ7HWR",
          "scope": "ORDER"
        }
      ]
    }
  }'

:slight_smile:

Thank you for your reply!
I created an order from the dashboard and entered the code using that as reference, and the following code was returned, so it was successful!

Thank you!