Docs
Storefront API
Checkout Store Credit

Checkout Store Credit

Add Store Credit

POST /checkouts/{checkoutId}/store-credit

Request

Applies any available store credit to a checkout. As on the storefront, all available store credit will be used (up to the value of the order) and no amount need be specified.

Note

  • Substitute your storefront domain for yourstore.example.com.
  • The Send a Test Request feature is not currently supported for this endpoint.
  • This endpoint requires using Stencil CLI, a local session, and a csrf token to work.

Parameters

  • store_domain in path - string
  • Content-Type in header with default of application/json - string
    required

    The MIME type of the request body.

Response

Body

object | application/json
  • data
    object

example

Remove Store Credit

DELETE /checkouts/{checkoutId}/store-credit

Request

Removes store credit from a checkout.

Note

  • Substitute your storefront domain for yourstore.example.com.
  • The Send a Test Request feature is not currently supported for this endpoint.
  • This endpoint requires using Stencil CLI, a local session, and a csrf token to work.

Parameters

  • store_domain in path - string
  • checkoutId in path - string
    required

    The ID of the subject checkout. Identical to the cart ID.

  • Accept in header with default of application/json - string
    required

    The MIME type of the response body.

example

Response

Body

object | application/json

    example

    Did you find what you were looking for?