joshnuss / commerce_billing

A payment processing library for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How does one use this module with Stripe Checkout?

kevinwo opened this issue · comments

If I use Checkout to pay, I receive a token from Stripe to send to my server in order to complete the payment. I see commerce_billing.ex only has an authorize(worker, amount, card, opts \\ []) method, while stripe.ex seems to mention an ID as an option in authorize(amount, card_or_id, opts) method. I tried passing my token from Checkout (e.g. tok_1234567890) into the former authorize method, but receive an "invalid_request" back from Stripe.

What is the purpose of the "id" in card_or_id, and is it possible to use the Checkout token to complete payment with commerce_billing?