class Stripe::Checkout::Session

Overview

https://stripe.com/docs/api/checkout/sessions/create

Included Modules

Defined in:

stripe/methods/core/checkout/sessions/create_session.cr
stripe/objects/core/checkout/session.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

Class Method Detail

def self.create(mode : String | Stripe::Checkout::Session::Mode, payment_method_types : Array(String), cancel_url : String, success_url : String, client_reference_id : String | Nil = nil, customer : String | Nil | Stripe::Customer | Nil = nil, customer_email : String | Nil = nil, line_items : Array(NamedTuple(quantity: Int32, price: String)) | Nil = nil, expand : Array(String) | Nil = nil, subscription_data : NamedTuple(metadata: Hash(String, String) | Nil) | Nil = nil, allow_promotion_codes : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, discounts : Array(NamedTuple(coupon: String) | NamedTuple(promotion_code: String)) | Nil = nil, payment_intent_data : Hash(String, String) | Nil = nil) : Stripe::Checkout::Session #

def self.list(payment_intent : String | Nil | Stripe::PaymentIntent | Nil = nil, subscription : String | Nil | Stripe::Subscription | Nil = nil, limit : Int32 | Nil = nil, starting_after : String | Nil = nil, ending_before : String | Nil = nil) : List(Stripe::Checkout::Session) #

def self.retrieve(id : String) #

def self.retrieve(checkout_session : Stripe::Checkout::Session) #

Instance Method Detail

def allow_promotion_codes : Bool | Nil #

def amount_subtotal : Int32 | Nil #

def amount_total : Int32 | Nil #

def billing_address_collection : BillingAddressCollection | Nil #

def cancel_url : String #

def client_reference_id : String | Nil #

def currency : String | Nil #

def customer : String | Nil | Stripe::Customer | Nil #

def customer_email : String | Nil #

def id : String #

def line_items : Array(Hash(String, String | Int32)) | Nil #

def livemode : Bool | Nil #

def metadata : Hash(String, String) | Nil #

def mode : String | Mode #

def object : String | Nil #

def payment_intent : String | Nil | Stripe::PaymentIntent | Nil #

def payment_intent_data : Hash(String, String) | Nil #

def payment_method_types : Array(String) #

def payment_status : PaymentStatus #

def setup_intent : String | Nil | Stripe::SetupIntent | Nil #

def shipping : Hash(String, String | Hash(String, String)) | Nil #

def shipping_address_collection : Hash(String, Array(String)) | Nil #

def submit_type : SubmitType | Nil #

def subscription : String | Nil | Stripe::Subscription | Nil #

def success_url : String #