HystoreWiki

2 min readView as Markdown

Stripe

Stripe takes cards from all over the world, with the money going to your Stripe account. It is the choice for selling to players outside Brazil.

You need a Stripe account activated for payments (with the company details and the bank account filled in on the Stripe Dashboard).

The Stripe card in the dashboard with the webhook step by step
The Stripe card in the dashboard with the webhook step by step

1. Copy the API keys

  1. On the Stripe Dashboard, open Developers > API keys.
  2. Switch to live mode (test mode off).
  3. Copy the publishable key, which starts with pk_live_, and paste it into the Public Key field of the dashboard.
  4. Reveal and copy the secret key, which starts with sk_live_, and paste it into Secret Key. Stripe shows the secret key only once: keep it somewhere safe.

2. Create the webhook

  1. On the Stripe Dashboard, open Developers > Webhooks and click add endpoint.

  2. Paste as the destination the URL the dashboard shows. It looks like this:

    Webhook URL
    https://webhooks.hystore.com.br/api/v1/webhooks/stripe/<your store id>
    
  3. Select these events:

    Webhook events
    checkout.session.completed
    checkout.session.async_payment_succeeded
    checkout.session.async_payment_failed
    checkout.session.expired
    charge.refunded
    charge.dispute.closed
    
  4. Save the endpoint and copy the signing secret, which starts with whsec_.

  5. Paste it into Webhook secret, in the dashboard.

3. Turn it on and save

Turn on the Stripe card's switch and save. The player pays on a secure Stripe page and comes back to the store with the order approved.

Refunds and disputes

With the charge.refunded and charge.dispute.closed events, a refund and a lost dispute on Stripe mark the order as Refunded on their own: deliveries that had not gone out are cancelled. See Orders.