Subscriptions
CreateSubscription
Enrolls a customer in a subscription.
If you provide a card on file in the request, Square charges the card for the subscription. Otherwise, Square sends an invoice to the customer's email address. The subscription starts immediately, unless the request includes the optional start_date. Each individual subscription is associated with a particular location.
For more information, see Create a subscription.
post/v2/subscriptions
Request body
Example request
{
"card_id": "ccof:qy5x8hHGYsgLrp4Q4GB",
"customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
"idempotency_key": "8193148c-9586-11e6-99f9-28cfe92138cf",
"location_id": "S8GWD5R9QB376",
"phases": [
{
"order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY",
"ordinal": 0
}
],
"plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H",
"source": {
"name": "My Application"
},
"start_date": "2023-06-20",
"timezone": "America/Los_Angeles"
}Response
Success
Example response
{
"subscription": {
"card_id": "ccof:qy5x8hHGYsgLrp4Q4GB",
"created_at": "2023-06-20T21:53:10Z",
"customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
"id": "56214fb2-cc85-47a1-93bc-44f3766bb56f",
"location_id": "S8GWD5R9QB376",
"phases": [
{
"order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY",
"ordinal": 0,
"plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP",
"uid": "873451e0-745b-4e87-ab0b-c574933fe616"
}
],
"plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H",
"source": {
"name": "My Application"
},
"start_date": "2023-06-20",
"status": "ACTIVE",
"timezone": "America/Los_Angeles",
"version": 1
}
}