subscriptionContractSetNextBillingDate mutation

Sets the next billing date of a Subscription Contract.

Required access

write_own_subscription_contracts access scope.

On this page

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.

mutation subscriptionContractSetNextBillingDate($contractId: ID!, $date: DateTime!) { subscriptionContractSetNextBillingDate(contractId: $contractId, date: $date) {
  1. <font style="color:#1F61A0;">contract</font> <font style="color:#555555;">{</font>
  2. <font style="color:#1F61A0;">id</font>
  3. <font style="color:#555555;">}</font>
  4. <font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
  5. <font style="color:#1F61A0;">code</font>
  6. <font style="color:#1F61A0;">field</font>
  7. <font style="color:#1F61A0;">message</font>
  8. <font style="color:#555555;">}</font>
} } { “contractId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “date”: “placeholder” }

Arguments

Argument Description
contractId
(
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

) REQUIRED
The gid of the Subscription Contract to set the next billing date for.
date
(
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01)

) REQUIRED
The next billing date.

Return fields

  • contract ([SubscriptionContract](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract))
    The updated Subscription Contract object.
  • userErrors ([[SubscriptionContractUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontractusererror))
    List of errors that occurred executing the mutation.