Payment model
1 endpoint. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.
Choose merchant of record or own gateway (must be allowed by the plan)
PUT
/v1/store/payment-modelOr name the store: PUT /v1/stores/{storeId}/payment-model
Body
paymentModel"merchant_of_record" | "seller_gateway"required
Response StoreSummary
idStoreIdrequirednamestringrequiredhandleStoreHandlerequireddomainstringrequiredcurrencyCurrencyCoderequiredpaymentModelPaymentModelrequiredplanIdPlanIdrequiredplanNamestringrequiredfeaturesFeatureKey[]requiredplanStateStorePlanState | nullrequired
3 more fields
categoryStoreCategory | nullrequiredlogoUrlstringrequiredtimezonestringrequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/payment-model" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"paymentModel": "merchant_of_record"
}'const res = await fetch('https://api.shopfa.st/v1/store/payment-model', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"paymentModel": "merchant_of_record"
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/payment-model",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"paymentModel": "merchant_of_record"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/payment-model", strings.NewReader(`{
"paymentModel": "merchant_of_record"
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)