# appCreditCreate - partner - MUTATION Version: unstable ## Description Allows an app to create a credit for a shop that can be used towards future app purchases. This mutation is only available to Partner API clients that have been granted the `View financials` permission. ### Access Scopes ## Arguments * [amount](/docs/api/partner/unstable/input-objects/MoneyInput): MoneyInput! - The amount that can be used towards future app purchases in Shopify. * [appId](/docs/api/partner/unstable/scalars/ID): ID! - The id of the app to associate the credit with. Example value: `gid://partners/App/123`. * [description](/docs/api/partner/unstable/scalars/String): String! - The description of the app credit. * [shopId](/docs/api/partner/unstable/scalars/ID): ID! - The id of the shop to be credited. Example value: `gid://partners/Shop/456`. * [test](/docs/api/partner/unstable/scalars/Boolean): Boolean - Specifies whether the app credit is a test transaction. ## Returns * [appCredit](/docs/api/partner/unstable/objects/AppCredit): AppCredit The app credit that was created. * [userErrors](/docs/api/partner/unstable/objects/UserError): UserError Errors when creating the application credit. ## Examples ### Creates an app credit Curl example: "curl -X POST \\\nhttps://partners.shopify.com/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {partner_access_token}' \\\n-d '{\n\"query\": \"mutation appCreditCreate($appId: ID!, $shopId: ID!, $amount: MoneyInput!, $description: String!, $test: Boolean) { appCreditCreate(appId: $appId, shopId: $shopId, amount: $amount, description: $description, test: $test) { appCredit { id, test, name, amount { amount, currencyCode, } } userErrors{ field, message } } }\"\n}'\n" Node example: null Ruby example: null Remix example: null Graphql query: "mutation appCreditCreate($appId: ID!, $shopId: ID!, $amount: MoneyInput!, $description: String!, $test: Boolean) {\n appCreditCreate(appId: $appId, shopId: $shopId, amount: $amount, description: $description, test: $test) {\n appCredit {\n id,\n test,\n name,\n amount {\n amount,\n currencyCode,\n }\n }\n userErrors{\n field,\n message\n }\n }\n }" #### Graphql Input null #### Graphql Response { "data": { "appCreditCreate": { "appCredit": { "id": "gid://shopify/AppCredit/1", "test": false, "name": "app credit description", "amount": { "amount": "100.0", "currencyCode": "USD" } }, "userErrors": [] } } }