Skip to content

Document Storefront customer auth and Stripe capture contracts - #54

Merged
roncodes merged 2 commits into
mainfrom
feature/storefront-auth-payment-contracts
Aug 31, 2026
Merged

Document Storefront customer auth and Stripe capture contracts#54
roncodes merged 2 commits into
mainfrom
feature/storefront-auth-payment-contracts

Conversation

@roncodes

Copy link
Copy Markdown
Member

Summary

  • send Customer-Token on both Storefront customer profile update routes
  • document ownership enforcement and the 403 response for missing or mismatched customer credentials
  • document idempotent/concurrent checkout capture behavior
  • document server-side Stripe PaymentIntent verification and the 402, 409, 422, and 502 responses

Source of truth

Aligned with the merged Storefront module changes on dev-v0.4.20 (PRs #92, #94, and #95).

Validation

  • npm run postman:lint
  • 5 native collections and 3 environments validated
  • Fleetbase Storefront API: 60 requests, 0 errors, 0 warnings

Test scope

The collection runner was not executed because the committed local environment intentionally contains no Storefront API credential. No secrets were added.

Documentation impact

The editable Storefront API collection and its repository reference README are updated. No generated fleetbase.io documentation was modified.

Both branches added the identical Customer-Token headers to the two
customer update requests, so only the descriptions conflicted — resolved
by combining this branch's exact 403 error contract with main's
authoritative-identity framing.

Capture checkout as order keeps main's functional change (it captures
the cash pickup checkout via {{cash_checkout_token}}, since a contract
run cannot complete a card payment) and this branch's documentation of
the idempotency and 402/409/422/502 verification contract, plus a note
pointing at the explicit 402 negative-contract request.

Validation: node scripts/validate-collections.js (5 collections, 3
environments) and postman collection lint on Fleetbase Storefront API —
62 items scanned, 0 errors, 0 warnings.
@roncodes

Copy link
Copy Markdown
Member Author

Resolved the merge conflicts with main (from #55, which landed the same Customer-Token headers plus the contract-run restructuring).

What survived the merge:

Is this PR still necessary? Yes, in its reduced form: after #55, its remaining value is documentation — the README section, and the richer capture/update descriptions (idempotency, exact error strings, the full status-code contract). The functional header changes are now no-ops relative to main.

Validation after resolution: node scripts/validate-collections.js (5 collections, 3 environments) and postman collection lint on Fleetbase Storefront API — 62 items, 0 errors, 0 warnings.

@roncodes
roncodes merged commit e8790c4 into main Aug 31, 2026
1 check passed
@roncodes
roncodes deleted the feature/storefront-auth-payment-contracts branch August 31, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant