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/methods/core/checkout/sessions/expire_session.cr
stripe/methods/core/checkout/sessions/list_line_items.cr
stripe/methods/core/checkout/sessions/update_session.cr
stripe/objects/core/checkout/session.cr

Constructors

Class Method Summary

Instance Method Summary

Macros inherited from module StripeMethods

add_delete_method add_delete_method, add_list_method(*arguments) add_list_method, add_retrieve_method add_retrieve_method

Constructor Detail

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

def self.new(*, __pull_for_json_serializable 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) | NamedTuple(quantity: Int32, price_data: NamedTuple(currency: String, product_data: NamedTuple(name: String) | Nil, unit_amount: Int32 | Nil, unit_amount_decimal: String | Nil, recurring: NamedTuple(interval: String, interval_count: Int32 | Nil) | Nil, tax_behavior: String | Nil))) | 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, billing_address_collection : Stripe::Checkout::Session::BillingAddressCollection | Nil = nil, automatic_tax : NamedTuple(enabled: Bool) | Nil = nil, phone_number_collection : NamedTuple(enabled: Bool) | Nil = nil, shipping_address_collection : NamedTuple(allowed_countries: Array(String)) | Nil = nil, shipping_options : Array(NamedTuple(shipping_rate: String)) | Nil = nil, submit_type : Stripe::Checkout::Session::SubmitType | Nil = nil, tax_id_collection : NamedTuple(enabled: Bool) | Nil = nil, expires_at : Time | Nil = nil, ui_mode : String | Nil = nil, return_url : String | Nil = nil, redirect_on_completion : String | Nil = nil, customer_update : NamedTuple | Nil = nil, customer_creation : String | NamedTuple | Nil = nil, invoice_creation : NamedTuple | Nil = nil, payment_method_collection : String | Nil = nil, payment_method_configuration : String | Nil = nil, payment_method_options : NamedTuple | Nil = nil, consent_collection : NamedTuple | Nil = nil, custom_fields : Array(NamedTuple) | Nil = nil, custom_text : NamedTuple | Nil = nil, after_expiration : NamedTuple | Nil = nil) : Stripe::Checkout::Session #

def self.expire(id : String | Stripe::Checkout::Session, expand : Array(String) | Nil = nil) : Stripe::Checkout::Session #

def self.line_items(id : String | Stripe::Checkout::Session, limit : Int32 | Nil = nil, starting_after : String | Nil = nil, ending_before : String | Nil = nil) : List(Stripe::Checkout::LineItem) #

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) #

def self.update(id : String | Stripe::Checkout::Session, metadata : Hash(String, String) | Nil = nil, expand : Array(String) | Nil = nil) : Stripe::Checkout::Session #

Instance Method Detail

def adaptive_pricing : Hash(String, String | Bool | Nil) | Nil #

def allow_promotion_codes : Bool | Nil #

def amount_subtotal : Int32 | Nil #

def amount_total : Int32 | Nil #

def automatic_tax : Hash(String, String | Bool | Nil) | Nil #

def billing_address_collection : BillingAddressCollection | Nil #

def cancel_url : String #

def client_reference_id : String | Nil #

def consent : Hash(String, String | Bool | Nil) | Nil #

def consent_collection : Hash(String, String | Bool | Nil) | Nil #

def created : Time | Nil #

Newer fields


def currency : String | Nil #

def custom_fields : Array(Hash(String, String | Bool | Hash(String, String | Bool) | Array(Hash(String, String | Bool)))) | Nil #

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

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

def customer_creation : String | Nil #

def customer_details : Hash(String, Bool | String | Hash(String, String | Bool | Array(Hash(String, String))) | Array(Hash(String, String)) | Nil) | Nil #

def customer_email : String | Nil #

def expires_at : Time | Nil #

def id : String #

def invoice : String | Nil | Stripe::Invoice | Nil #

def invoice_creation : Hash(String, String | Bool | Hash(String, String | Bool)) | Nil #

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_link : String | Nil #

def payment_method_collection : String | Nil #

def payment_method_configuration : String | Nil #

def payment_method_options : Hash(String, String | Bool | Int32 | Hash(String, String | Bool | Int32)) | Nil #

def payment_method_types : Array(String) #

def payment_status : PaymentStatus #

def phone_number_collection : Hash(String, Bool) | Nil #

def recovered_from : String | Nil #

def return_url : String | Nil #

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 shipping_cost : Hash(String, String | Int32 | Bool | Hash(String, String | Int32 | Bool)) | Nil #

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

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

def status : Status | Nil #

def submit_type : SubmitType | Nil #

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

def success_url : String #

def tax_id_collection : Hash(String, Bool) | Nil #

def total_details : Hash(String, Int32) | Nil #

def ui_mode : String | Nil #

def url : String | Nil #