StorefrontStoreCredit
/rpc#StorefrontStoreCreditThe store credit the signed-in shopper has at the store, and how they pay with it. Routed to the storefront RPC server by the x-storefront-request: true header. The store is resolved from the merchant domain's Host, so call it through the storefront route POST https://<store-domain>/api/store-credit, which forwards the shopper's cookies.
Header Parameters
Value in
- "true"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "Request"
Correlates the response line with this request.
Value in
- "StorefrontStoreCredit"
Leave empty; the server prepends the HTTP request headers.
items <= 0Response Body
application/json
curl -X POST "https://$STORE_DOMAIN/api/store-credit" \ -H "Content-Type: application/json" \ -d 'null'{ "_tag": "Exit", "requestId": "string", "exit": { "_tag": "Success", "value": { "buyer": { "email": "string", "balance": { "amountMinorUnits": "string", "currency": "AED" }, "method": { "id": "string", "providerId": "stripe", "displayName": "string", "iconUrl": "string", "capabilities": { "canCapture": true, "canRefund": true, "canPartialRefund": true, "requiresManualVerification": true, "notifications": [ "webhook" ], "supportsPreauthorization": true, "hasApiValidation": true, "redeemsVouchers": true }, "renewals": "automatic", "cryptoAssets": [ "btc" ], "publishableKey": "string" } } } }}StoreApiKeys POST
The keys the store's own servers call these RPCs with. A store API key can call it, a read-only one included.
IssueStorePrivatePluginDeployToken POST
Tokens that deploy a store-private plugin from its repository's CI. Only a seller signed in to the dashboard can call it; store API keys are refused.
