ApplicationCredit

The ApplicationCredit resource is used to issue credits to merchants that can be used towards future app purchases in Shopify. You can create an application credit by sending a request that includes the credit amount and a description explaining the reason for the credit. A corresponding deduction based on your revenue share is entered in your Partner account by Shopify. For example, if you create a credit for $10.00, then a deduction of $8.00 is applied.

The total amount of all application credits requested by an app must not exceed the total amount the shop owner was charged in the last 30 days, or the total amount of pending payouts in the app's Partner account.

Note

The ApplicationCredit resource can be used only by apps that use Shopify's Billing API (ApplicationCharge, RecurringApplicationCharge, or UsageCharge).

What you can do with ApplicationCredit

The Shopify API lets you do the following with the ApplicationCredit resource. More detailed versions of these general actions may be available:

ApplicationCredit properties

description
"description": "Super Mega Plan 1000 emails"

The description of the application credit.

id
"id": 675931192

The ID of the application credit.

amount
"amount": 10

The amount refunded by the application credit.

test
"test": null

Whether the application credit is a test transaction. Valid values: true,null

Endpoints

POST /admin/application_credits.json
Creates an application credit

Create a new credit

POST /admin/application_credits.json
{
  "application_credit": {
    "description": "application credit for refund",
    "amount": 5.0
  }
}
View Response
HTTP/1.1 201 Created
{
  "application_credit": {
    "id": 1031636125,
    "amount": "5.00",
    "description": "application credit for refund",
    "test": null
  }
}

Create a test application credit that will not issue a credit to the merchant

POST /admin/application_credits.json
{
  "application_credit": {
    "description": "application credit for refund",
    "amount": 5.0,
    "test": true
  }
}
View Response
HTTP/1.1 201 Created
{
  "application_credit": {
    "id": 1031636126,
    "amount": "5.00",
    "description": "application credit for refund",
    "test": true
  }
}

Creating a credit amount that exceeds shop owner purchases over last 30 days will return an error

POST /admin/application_credits.json
{
  "application_credit": {
    "description": "application credit for refund",
    "amount": 5.0
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "base": [
      "Amount exceeded 30 day shop credit issue limit"
    ]
  }
}

Creating a credit amount that exceeds the total pending payouts for the app will return an error

POST /admin/application_credits.json
{
  "application_credit": {
    "description": "application credit for refund",
    "amount": 5.0
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "base": [
      "Amount exceeded pending receivable credit issue limit"
    ]
  }
}

Applying a credit to a shop without a previous app purchase will return an error

POST /admin/application_credits.json
{
  "application_credit": {
    "description": "application credit for refund",
    "amount": 5.0
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "base": [
      "Amount exceeded pending receivable credit issue limit"
    ]
  }
}
GET /admin/application_credits/445365009.json
Retrieves a single application credit
fields

A comma-separated list of fields to include in the response.

Retrieve a single application credit

GET /admin/application_credits/#{application_credit_id}.json
View Response
HTTP/1.1 200 OK
{
  "application_credit": {
    "id": 445365009,
    "amount": "5.00",
    "description": "credit for application refund",
    "test": null
  }
}
GET /admin/application_credits.json
Retrieves all application credits
fields

A comma-separated list of fields to include in the response.

Retrieve all application credits

GET /admin/application_credits.json
View Response
HTTP/1.1 200 OK
{
  "application_credits": [
    {
      "id": 445365009,
      "amount": "5.00",
      "description": "credit for application refund",
      "test": null
    }
  ]
}

Sign up for a Partner account to get started.

Sign up