On this page:
make-checkout-http-service
checkout-http-service?
handle-checkout-http-post

14 Hosted checkout HTTP🔗ℹ

 (require commerce/checkout-http) package: commerce

Server processes explicitly require commerce/checkout-http. The checkout transport turns one authenticated product request into one admitted, admission-checked, and once-only provider checkout — trusted server-side pricing, never a public checkout API.

procedure

(make-checkout-http-service #:admission admission 
  #:admission-json admission-json 
  #:storage storage 
  #:signer signer 
  #:service-id service-id 
  #:service-key service-key 
  #:issuer issuer 
  #:app-id app-id 
  #:seller-id seller-id 
  #:gateway gateway 
  #:notify-url notify-url 
  #:return-url return-url 
  #:claim-once! claim-once! 
  [#:clock clock]) 
 → checkout-http-service?
  admission : provider-admission?
  admission-json : hash?
  storage : commerce-storage?
  signer : procedure?
  service-id : string?
  service-key : bytes?
  issuer : string?
  app-id : string?
  seller-id : string?
  gateway : string?
  notify-url : string?
  return-url : string?
  claim-once! : procedure?
  clock : procedure? = current-seconds
Binds one admission record, its parsed JSON, storage, the request signer, channel gateway configuration, and the product-side once-only claim callback behind one opaque service.

procedure

(checkout-http-service? value) → boolean?

  value : any/c
Recognizes one bound checkout HTTP service.

procedure

(handle-checkout-http-post service 
  #:method method 
  #:path path 
  #:body raw 
  #:headers headers 
  #:now now) 
 → 
exact-nonnegative-integer? bytes?
  service : checkout-http-service?
  method : string?
  path : string?
  raw : bytes?
  headers : any/c
  now : exact-nonnegative-integer?
Handles one checkout POST. The admission record authorizes the product, offer, and amount before any provider call; a request id gives one order per product request id; failures deny with a bounded, redacted JSON body.