--- title: subscriptionContractCreate - GraphQL Admin description: |- Creates a Subscription Contract Draft. You can submit all the desired information for the draft using [Subscription Draft Input object](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionDraftInput). You can also update the draft using the [Subscription Contract Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractUpdate) mutation. The draft is not saved until you call the [Subscription Draft Commit](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit) mutation. api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractCreate md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractCreate.md --- # subscription​Contract​Create mutation Requires `write_own_subscription_contracts` access scope. Also: The user must have manage\_orders\_information permission. Creates a Subscription Contract Draft. You can submit all the desired information for the draft using [Subscription Draft Input object](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionDraftInput). You can also update the draft using the [Subscription Contract Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractUpdate) mutation. The draft is not saved until you call the [Subscription Draft Commit](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit) mutation. ## Arguments * input [Subscription​Contract​Create​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionContractCreateInput) required The properties of the new Subscription Contract. *** ## Subscription​Contract​Create​Payload returns * draft [Subscription​Draft](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDraft) The Subscription Contract object. * user​Errors [\[Subscription​Draft​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDraftUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### Create a subscription contract with draft input #### Query ```graphql mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } } ``` #### Variables ```json { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }", "variables": { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }`, { variables: { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } } QUERY variables = { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }`, "variables": { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } }, }, }); ``` #### Response ```json { "subscriptionContractCreate": { "draft": { "id": "gid://shopify/SubscriptionDraft/1055577422" }, "userErrors": [] } } ``` * ### subscriptionContractCreate reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20createSubscriptionContract\(%24input%3A%20SubscriptionContractCreateInput!\)%20%7B%0A%20%20subscriptionContractCreate\(input%3A%20%24input\)%20%7B%0A%20%20%20%20draft%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%7D%0A%20%20%20%20userErrors%20%7B%0A%20%20%20%20%20%20field%0A%20%20%20%20%20%20message%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22input%22%3A%20%7B%0A%20%20%20%20%22customerId%22%3A%20%22gid%3A%2F%2Fshopify%2FCustomer%2F544365967%22%2C%0A%20%20%20%20%22currencyCode%22%3A%20%22USD%22%2C%0A%20%20%20%20%22nextBillingDate%22%3A%20%222024-10-11T21%3A11%3A01-04%3A00%22%2C%0A%20%20%20%20%22contract%22%3A%20%7B%0A%20%20%20%20%20%20%22status%22%3A%20%22ACTIVE%22%2C%0A%20%20%20%20%20%20%22note%22%3A%20%22Note%20of%20a%20thing.%22%2C%0A%20%20%20%20%20%20%22customAttributes%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22key%22%3A%20%22Test%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Test%20value%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22paymentMethodId%22%3A%20%22gid%3A%2F%2Fshopify%2FCustomerPaymentMethod%2Fb7cc6e3267aace169e516ed48be72dff%22%2C%0A%20%20%20%20%20%20%22billingPolicy%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22minCycles%22%3A%203%2C%0A%20%20%20%20%20%20%20%20%22maxCycles%22%3A%2012%2C%0A%20%20%20%20%20%20%20%20%22intervalCount%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%22interval%22%3A%20%22MONTH%22%2C%0A%20%20%20%20%20%20%20%20%22anchors%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22MONTHDAY%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22day%22%3A%2012%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22deliveryPolicy%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22intervalCount%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%22interval%22%3A%20%22MONTH%22%2C%0A%20%20%20%20%20%20%20%20%22anchors%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22MONTHDAY%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22day%22%3A%2013%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22deliveryPrice%22%3A%202.99%2C%0A%20%20%20%20%20%20%22deliveryMethod%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22shipping%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22address%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Mont%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22R%C3%A9al%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22address1%22%3A%20%22490%20Rue%20De%20La%20Gaucheti%C3%A8re%20O%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22country%22%3A%20%22Canada%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22province%22%3A%20%22Qu%C3%A9bec%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22phone%22%3A%20%22%2B16135551212%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22zip%22%3A%20%22H2Z%200B3%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22city%22%3A%20%22Montr%C3%A9al%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22shippingOption%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22Subscription%20shipping%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22presentmentTitle%22%3A%20%22Translated%20shipping%20for%20subscription%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22description%22%3A%20%225-7%20Days%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22code%22%3A%20%22GROUND%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22carrierServiceId%22%3A%20null%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }`, { variables: { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }", "variables": { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }`, { variables: { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } }, }, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } }`, "variables": { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } }, }, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation createSubscriptionContract($input: SubscriptionContractCreateInput!) { subscriptionContractCreate(input: $input) { draft { id } userErrors { field message } } } QUERY variables = { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "input": { "customerId": "gid://shopify/Customer/544365967", "currencyCode": "USD", "nextBillingDate": "2024-10-11T21:11:01-04:00", "contract": { "status": "ACTIVE", "note": "Note of a thing.", "customAttributes": [ { "key": "Test", "value": "Test value" } ], "paymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff", "billingPolicy": { "minCycles": 3, "maxCycles": 12, "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 12 } ] }, "deliveryPolicy": { "intervalCount": 1, "interval": "MONTH", "anchors": [ { "type": "MONTHDAY", "day": 13 } ] }, "deliveryPrice": 2.99, "deliveryMethod": { "shipping": { "address": { "firstName": "Mont", "lastName": "Réal", "address1": "490 Rue De La Gauchetière O", "country": "Canada", "province": "Québec", "phone": "+16135551212", "zip": "H2Z 0B3", "city": "Montréal" }, "shippingOption": { "title": "Subscription shipping", "presentmentTitle": "Translated shipping for subscription", "description": "5-7 Days", "code": "GROUND", "carrierServiceId": null } } } } } } ``` ## Response JSON ```json { "subscriptionContractCreate": { "draft": { "id": "gid://shopify/SubscriptionDraft/1055577422" }, "userErrors": [] } } ```