Get a store credit
GET
Spree SDK
Authorizations
Publishable API key for store access
JWT token for authenticated customers
Path Parameters
Query Parameters
Comma-separated list of fields to include (e.g., amount,currency). id is always included.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const credit = await client.customer.storeCredits.get('credit_abc123', {
token: '<token>',
})curl --request GET \
--url http://{defaultHost}/api/v3/store/customers/me/store_credits/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"id": "credit_UkLWZg9DAJ",
"amount": "100.0",
"amount_used": "0.0",
"amount_remaining": "100.0",
"display_amount": "$100.00",
"display_amount_used": "$0.00",
"display_amount_remaining": "$100.00",
"currency": "USD"
}{
"error": {
"code": "record_not_found",
"message": "Store credit not found"
}
}Publishable API key for store access
JWT token for authenticated customers
Comma-separated list of fields to include (e.g., amount,currency). id is always included.
Was this page helpful?
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const credit = await client.customer.storeCredits.get('credit_abc123', {
token: '<token>',
})curl --request GET \
--url http://{defaultHost}/api/v3/store/customers/me/store_credits/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"id": "credit_UkLWZg9DAJ",
"amount": "100.0",
"amount_used": "0.0",
"amount_remaining": "100.0",
"display_amount": "$100.00",
"display_amount_used": "$0.00",
"display_amount_remaining": "$100.00",
"currency": "USD"
}{
"error": {
"code": "record_not_found",
"message": "Store credit not found"
}
}