On this page:
make-verified-payment-event
checkout-session
provider-adapter

2 Provider boundary🔗ℹ

 (require commerce/provider) package: commerce

Provider adapters require commerce/provider and construct a canonical event only after authenticating the exact raw input, mapping the Offer and subject, checking amount and currency, and performing any active order lookup required by the provider contract.

procedure

(make-verified-payment-event provider 
  event-id 
  payload-digest 
  kind 
  order-id 
  offer-id 
  subject-id 
  amount 
  occurred-at 
  [#:paid-through paid-through]) 
 → payment-event?
  provider : string?
  event-id : string?
  payload-digest : string?
  kind : symbol?
  order-id : string?
  offer-id : string?
  subject-id : string?
  amount : money?
  occurred-at : exact-nonnegative-integer?
  paid-through : (or/c exact-nonnegative-integer? #f) = #f
Constructs the canonical event after the adapter’s own authentication and semantic checks. Product clients must not call this function.

struct

(struct checkout-session (provider session-id url expires-at))

  provider : string?
  session-id : string?
  url : string?
  expires-at : exact-nonnegative-integer?
One hosted checkout session returned by a provider adapter.

struct

(struct provider-adapter (provider verify))

  provider : string?
  verify : (procedure?)
Opaque adapter value binding one channel to its verification procedure.