> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retry failed grants

> Retries the access grant for paid digital orders that failed.

Retries the access grant for the store's paid digital orders marked failed (the `failedGrants` list on [List buyer access](/apps-api/endpoint/digital-access/list-digital-access)), at most 25 per call. It only grants access: it does not send the buyer's download email. `results` reports each order. Requires the `WRITE_INVENTORY` scope.

<Note>
  These endpoints only work on a store whose type is `digital`. On any other store they return `403` with `This is only available on digital stores.` See [Digital stores](/digital-stores).
</Note>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.salesive.com/api/v1/digital-access/retry-grants \
    -H "Authorization: Bearer app_<your-app-access-token>"
  ```
</CodeGroup>


## OpenAPI

````yaml apps-api/specs/digital.json POST /digital-access/retry-grants
openapi: 3.1.0
info:
  title: Salesive Apps API , Digital products
  description: >-
    Digital store endpoints (products, the all-access pass and buyer access)
    callable by an installed third-party app using its app access token. They
    only work on stores whose type is `digital`. The target store is bound to
    the token server-side by the OAuth install flow.
  version: 1.0.0
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /digital-access/retry-grants:
    post:
      tags:
        - digital-access
      summary: Retry failed grants
      description: >-
        Retries the access grant for paid digital orders marked failed (the
        `failedGrants` list), at most 25 per call. It grants access only: it
        does not send the buyer's download email. Results are per order.
        Requires the `WRITE_INVENTORY` scope. The store must be a digital store,
        otherwise the call returns 403.
      operationId: retryDigitalGrants
      responses:
        '200':
          description: 'Retry failed grants: success.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - success
                  - message
                  - data
                properties:
                  status:
                    type: integer
                    example: 200
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Grants retried
                  data:
                    type: object
                    properties:
                      retried:
                        type: integer
                      granted:
                        type: integer
                      failed:
                        type: integer
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            orderId:
                              type: string
                            ok:
                              type: boolean
                            error:
                              type: string
                    example:
                      retried: 1
                      granted: 1
                      failed: 0
                      results:
                        - orderId: 6702b4c0e1b3a40012cd6001
                          ok: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 401
              success:
                type: boolean
                example: false
              message:
                type: string
                example: App token expired or invalid.
              data:
                type: object
                nullable: true
    Forbidden:
      description: >-
        The app token lacks the required scope (`READ_INVENTORY` for reads,
        `WRITE_INVENTORY` for writes), or the store is not a digital store
        (`This is only available on digital stores.`).
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 403
              success:
                type: boolean
                example: false
              message:
                type: string
                example: >-
                  This app is missing the required permission(s):
                  WRITE_INVENTORY
              data:
                type: object
                nullable: true
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side , never send a shop
        id.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.