@@ -92,11 +92,30 @@ func (s *ServiceCheckoutSessions) Expire(id string) (*CheckoutSession, error) {
9292//
9393// API reference: https://docs.payrexhq.com/docs/api/checkout_sessions/create
9494type CreateCheckoutSessionParams struct {
95- URL string `form:"url"`
96- Description * string `form:"description"`
97- Events []EventType `form:"events"`
95+ CustomerReferenceID * string `form:"customer_reference_id"`
96+ Currency Currency `form:"currency"`
97+ LineItems []CheckoutSessionLineItemParams `form:"line_items"`
98+ Metadata * map [string ]string `form:"metadata"`
99+ SuccessURL string `form:"success_url"`
100+ CancelURL string `form:"cancel_url"`
101+ ExpiresAt * int `form:"expires_at"`
102+ PaymentMethods []PaymentMethod `form:"payment_methods"`
103+ BillingDetailsCollection * string `form:"billing_details_collection"`
104+ Description * string `form:"description"`
105+ SubmitType * string `form:"submit_type"`
106+ PaymentMethodOptions * PaymentMethodOptions `form:"payment_method_options"`
98107}
99108
109+ type CheckoutSessionLineItemParams struct {
110+ Name string `form:"name"`
111+ Amount int `form:"amount"`
112+ Quantity int `form:"quantity"`
113+ Description * string `form:"description"`
114+ Image * string `form:"image"`
115+ }
116+
117+ // TODO: add API reference for ListCheckoutSessionsParams when docs for `GET /checkout_sessions` is added
118+
100119// ListCheckoutSessionsParams represents the available [ServiceCheckoutSessions.List] parameters.
101120type ListCheckoutSessionsParams struct {
102121 Limit * int `form:"int"`
0 commit comments