For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Carts
      • Checkouts
          • GETGet Checkout
          • PUTUpdate Customer Messages
            • POSTAdd Store Credit
            • DELRemove Store Credit
      • Consent
      • Customers
      • Subscriptions
      • Form Fields
      • Orders
      • Pickup Options
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTStorefrontCheckoutsStore Credit

Add Store Credit

POST
https://your_store.example.com/api/storefront/checkouts/:checkoutId/store-credit
POST
/api/storefront/checkouts/:checkoutId/store-credit
$curl -X POST https://your_store.example.com/api/storefront/checkouts/checkoutId/store-credit \
> -H "Accept: application/json" \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3 "cartId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "customerId": 987654,
5 "storeCreditApplied": 25,
6 "total": 75,
7 "currency": "USD",
8 "items": [
9 {
10 "productId": 12345,
11 "name": "Wireless Bluetooth Headphones",
12 "quantity": 1,
13 "price": 100
14 }
15 ],
16 "updatedAt": "2024-06-15T12:00:00Z"
17}
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.
Was this page helpful?
Previous

Checkout Spam Protection

Next

Remove Store Credit

Built with

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.

Path parameters

checkoutIdstringRequiredformat: "uuid"
The ID of the subject checkout. Identical to the cart ID.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Response

Returns the checkout object.