View Source Stripe.Terminal.Reader (stripity_stripe v3.3.1)
A Reader represents a physical device for accepting payment details.
Related guide: Connecting to a reader
Summary
Types
Simulated data for the card payment method.
Simulated data for the card_present payment method.
Cart details to display on the reader screen, including line items, amounts, and currency.
Configuration overrides for this collection, such as tipping, surcharging, and customer cancellation settings.
Configuration overrides for this confirmation, such as surcharge settings and return URL.
Customize the text which will be displayed while collecting this input
Simulated data for the interac_present payment method.
Configuration overrides for this transaction, such as tipping and customer cancellation settings.
Configuration overrides for this refund, such as customer cancellation settings.
Options for the selection input
The terminal.reader type.
Tipping configuration for this transaction.
Functions
Cancels the current reader action. See Programmatic Cancellation for more details.
Initiates an input collection flow on a Reader to display input forms and collect information from your customers.
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See Collecting a Payment method for more details.
Finalizes a payment on a Reader. See Confirming a Payment for more details.
Creates a new Reader object.
Deletes a Reader object.
Returns a list of Reader objects.
Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
Initiates a payment flow on a Reader. See process the payment for more details.
Initiates a SetupIntent flow on a Reader. See Save directly without charging for more details.
Initiates an in-person refund on a Reader. See Refund an Interac Payment for more details.
Retrieves a Reader object.
Sets the reader display to show cart details.
Use this endpoint to trigger a successful input collection on a simulated reader.
Use this endpoint to complete an input collection with a timeout error on a simulated reader.
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Types
@type card() :: %{ optional(:cvc) => binary(), optional(:exp_month) => integer(), optional(:exp_year) => integer(), optional(:number) => binary() }
Simulated data for the card payment method.
@type card_present() :: %{optional(:number) => binary()}
Simulated data for the card_present payment method.
@type cart() :: %{ optional(:currency) => binary(), optional(:line_items) => [line_items()], optional(:tax) => integer(), optional(:total) => integer() }
Cart details to display on the reader screen, including line items, amounts, and currency.
@type collect_config() :: %{ optional(:allow_redisplay) => :always | :limited | :unspecified, optional(:enable_customer_cancellation) => boolean(), optional(:skip_tipping) => boolean(), optional(:tipping) => tipping() }
Configuration overrides for this collection, such as tipping, surcharging, and customer cancellation settings.
@type confirm_config() :: %{optional(:return_url) => binary()}
Configuration overrides for this confirmation, such as surcharge settings and return URL.
@type custom_text() :: %{ optional(:description) => binary(), optional(:skip_button) => binary(), optional(:submit_button) => binary(), optional(:title) => binary() }
Customize the text which will be displayed while collecting this input
@type inputs() :: %{ optional(:custom_text) => custom_text(), optional(:required) => boolean(), optional(:selection) => selection(), optional(:toggles) => [toggles()], optional(:type) => :email | :numeric | :phone | :selection | :signature | :text }
@type interac_present() :: %{optional(:number) => binary()}
Simulated data for the interac_present payment method.
@type process_config() :: %{ optional(:allow_redisplay) => :always | :limited | :unspecified, optional(:enable_customer_cancellation) => boolean(), optional(:return_url) => binary(), optional(:skip_tipping) => boolean(), optional(:tipping) => tipping() }
Configuration overrides for this transaction, such as tipping and customer cancellation settings.
@type refund_payment_config() :: %{ optional(:enable_customer_cancellation) => boolean() }
Configuration overrides for this refund, such as customer cancellation settings.
@type selection() :: %{optional(:choices) => [choices()]}
Options for the selection input
@type t() :: %Stripe.Terminal.Reader{ action: term() | nil, device_sw_version: binary() | nil, device_type: binary(), id: binary(), ip_address: binary() | nil, label: binary(), last_seen_at: integer() | nil, livemode: boolean(), location: (binary() | Stripe.Terminal.Location.t()) | nil, metadata: term(), object: binary(), serial_number: binary(), status: binary() | nil }
The terminal.reader type.
actionThe most recent action performed by the reader.device_sw_versionThe current software version of the reader.device_typeDevice type of the reader.idUnique identifier for the object.ip_addressThe local IP address of the reader.labelCustom label given to the reader for easier identification.last_seen_atThe last time this reader reported to Stripe backend.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.locationThe location identifier of the reader.metadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.objectString representing the object's type. Objects of the same type share the same value.serial_numberSerial number of the reader.statusThe networking status of the reader. We do not recommend using this field in flows that may block taking payments.
@type tipping() :: %{optional(:amount_eligible) => integer()}
Tipping configuration for this transaction.
Functions
@spec cancel_action( reader :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Cancels the current reader action. See Programmatic Cancellation for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/cancel_action
@spec collect_inputs( reader :: binary(), params :: %{ optional(:expand) => [binary()], optional(:inputs) => [inputs()], optional(:metadata) => %{optional(binary()) => binary()} }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Initiates an input collection flow on a Reader to display input forms and collect information from your customers.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/collect_inputs
@spec collect_payment_method( reader :: binary(), params :: %{ optional(:collect_config) => collect_config(), optional(:expand) => [binary()], optional(:payment_intent) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See Collecting a Payment method for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/collect_payment_method
@spec confirm_payment_intent( reader :: binary(), params :: %{ optional(:confirm_config) => confirm_config(), optional(:expand) => [binary()], optional(:payment_intent) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Finalizes a payment on a Reader. See Confirming a Payment for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/confirm_payment_intent
@spec create( params :: %{ optional(:expand) => [binary()], optional(:label) => binary(), optional(:location) => binary(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:registration_code) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a new Reader object.
Details
- Method:
post - Path:
/v1/terminal/readers
@spec delete(reader :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedTerminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Deletes a Reader object.
Details
- Method:
delete - Path:
/v1/terminal/readers/{reader}
@spec list( params :: %{ optional(:device_type) => :bbpos_chipper2x | :bbpos_wisepad3 | :bbpos_wisepos_e | :mobile_phone_reader | :simulated_stripe_s700 | :simulated_wisepos_e | :stripe_m2 | :stripe_s700 | :verifone_P400, optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:location) => binary(), optional(:serial_number) => binary(), optional(:starting_after) => binary(), optional(:status) => :offline | :online }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of Reader objects.
Details
- Method:
get - Path:
/v1/terminal/readers
@spec present_payment_method( reader :: binary(), params :: %{ optional(:amount_tip) => integer(), optional(:card) => card(), optional(:card_present) => card_present(), optional(:expand) => [binary()], optional(:interac_present) => interac_present(), optional(:type) => :card | :card_present | :interac_present }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
Details
- Method:
post - Path:
/v1/test_helpers/terminal/readers/{reader}/present_payment_method
@spec process_payment_intent( reader :: binary(), params :: %{ optional(:expand) => [binary()], optional(:payment_intent) => binary(), optional(:process_config) => process_config() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Initiates a payment flow on a Reader. See process the payment for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/process_payment_intent
@spec process_setup_intent( reader :: binary(), params :: %{ optional(:allow_redisplay) => :always | :limited | :unspecified, optional(:expand) => [binary()], optional(:process_config) => process_config(), optional(:setup_intent) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Initiates a SetupIntent flow on a Reader. See Save directly without charging for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/process_setup_intent
@spec refund_payment( reader :: binary(), params :: %{ optional(:amount) => integer(), optional(:charge) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:payment_intent) => binary(), optional(:refund_application_fee) => boolean(), optional(:refund_payment_config) => refund_payment_config(), optional(:reverse_transfer) => boolean() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Initiates an in-person refund on a Reader. See Refund an Interac Payment for more details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/refund_payment
@spec retrieve( reader :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t() | Stripe.DeletedTerminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a Reader object.
Details
- Method:
get - Path:
/v1/terminal/readers/{reader}
@spec set_reader_display( reader :: binary(), params :: %{ optional(:cart) => cart(), optional(:expand) => [binary()], optional(:type) => :cart }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Sets the reader display to show cart details.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}/set_reader_display
@spec succeed_input_collection( reader :: binary(), params :: %{ optional(:expand) => [binary()], optional(:skip_non_required_inputs) => :all | :none }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Use this endpoint to trigger a successful input collection on a simulated reader.
Details
- Method:
post - Path:
/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection
@spec timeout_input_collection( reader :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Use this endpoint to complete an input collection with a timeout error on a simulated reader.
Details
- Method:
post - Path:
/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection
@spec update( reader :: binary(), params :: %{ optional(:expand) => [binary()], optional(:label) => binary() | binary(), optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t() | Stripe.DeletedTerminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Details
- Method:
post - Path:
/v1/terminal/readers/{reader}