Store Credit
Category: Store
Base URL: /store/carts
Authentication: Mixed
Routes: 4 routes documented
Overview#
This section documents 4 API routes for store credit.
A signed-in customer can list their balances, claim one by code, and spend from it at checkout. Accounts are opened and credited from the admin endpoints. For a balance held against a code instead, see gift cards.
Applying a balance to a cart does not spend it. The deduction happens when the order completes, and is undone if payment fails. See Gift Cards & Store Credit for the full lifecycle, the differences between the two, refunds, and troubleshooting.
Quick Reference#
| Method | Endpoint | Description |
|---|---|---|
| POST | /store/carts/:id/store-credits |
Spend store credit on a cart. Takes amount, so a customer ... |
| GET | /store/store-credit-accounts |
List the signed-in customer's store credit accounts. |
| GET | /store/store-credit-accounts/:id |
Retrieve one of the signed-in customer's accounts and its ba... |
| POST | /store/store-credit-accounts/claim |
Claim a store credit account, attaching one created in advan... |
POST Store Carts :id Store-credits#
Endpoint: POST /store/carts/:id/store-credits
Authentication: Customer (Optional)
Description#
Spend store credit on a cart. Takes amount, so a customer can apply part of a balance and keep the rest — the behaviour a promotion code cannot offer, since a code is consumed whole.
URL Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Id identifier |
Request Body#
| Field | Type | Required |
|---|---|---|
amount |
number | No |
Response#
Success:
{
cart,
}Example Request#
curl -X POST 'https://your-store.omnicart.cc/store/carts/:id/store-credits' \
-H 'Content-Type: application/json'GET Store Store-credit-accounts#
Endpoint: GET /store/store-credit-accounts
Authentication: Customer (Optional)
Description#
List the signed-in customer's store credit accounts.
Response#
Success:
{
store_credit_accounts,
count,
offset,
limit,
}Example Request#
curl -X GET 'https://your-store.omnicart.cc/store/store-credit-accounts' \
-H 'Content-Type: application/json'GET Store Store-credit-accounts :id#
Endpoint: GET /store/store-credit-accounts/:id
Authentication: Customer (Optional)
Description#
Retrieve one of the signed-in customer's accounts and its balance.
URL Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Id identifier |
Response#
Success:
{
store_credit_account,
}Example Request#
curl -X GET 'https://your-store.omnicart.cc/store/store-credit-accounts/:id' \
-H 'Content-Type: application/json'POST Store Store-credit-accounts Claim#
Endpoint: POST /store/store-credit-accounts/claim
Authentication: Customer (Optional)
Description#
Claim a store credit account, attaching one created in advance to the signed-in customer. This is how credit issued before a customer had an account reaches them once they register.
Request Body#
| Field | Type | Required |
|---|---|---|
code |
string | Yes |
Response#
Success:
{
store_credit_account,
}Example Request#
curl -X POST 'https://your-store.omnicart.cc/store/store-credit-accounts/claim' \
-H 'Content-Type: application/json'