subscriptionBillingAttemptCreate mutation
Creates a new subscription billing attempt.
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 subscriptionBillingAttemptCreate($subscriptionContractId: ID!, $subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput!) { subscriptionBillingAttemptCreate(subscriptionContractId: $subscriptionContractId, subscriptionBillingAttemptInput: $subscriptionBillingAttemptInput) {} } { “subscriptionContractId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “subscriptionBillingAttemptInput”: {
<font style="color:#1F61A0;">subscriptionBillingAttempt</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">code</font>
<font style="color:#1F61A0;">field</font>
<font style="color:#1F61A0;">message</font>
<font style="color:#555555;">}</font>
} }
<font style="color:#8B2BB9;">"idempotencyKey"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"placeholder"</font>
Arguments
SubscriptionBillingAttemptInput fields
- idempotencyKey (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
) REQUIRED
A unique key generated by the client to avoid duplicate payments.
Return fields
- subscriptionBillingAttempt (
[SubscriptionBillingAttempt](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingattempt)
)
The subscription billing attempt. - userErrors (
[[BillingAttemptUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/billingattemptusererror)
)
List of errors that occurred executing the mutation.