Stripe

Here is an explanation of the payment settings for the Stripe operator.

Stripe is an international operator - it is particularly useful when you accept payments in a currency other than Polish zloty.

Available options

Here is a list of the available options with a short explanation.

Stripe API Key

Determines the secret API key of your Stripe account (starting with sk_). A restricted key (rk_) can also be used.

Stripe Webhook Secret

Determines the signing secret (whsec_...) of the webhook through which Stripe informs Foto.Guru about the payment status. Thanks to it, the order status changes automatically to “Paid” when the customer pays for it correctly.

You will find both values in the Stripe dashboard. Below we show step by step where to look for them.

Tip

Stripe has separate keys and separate webhooks for test mode and live mode. If you enable Test mode in Foto.Guru, carry out the steps below in Stripe’s test mode (the Test mode switch in the top right corner of the dashboard). Before accepting real payments, repeat them in live mode.

Settings in the Stripe account

API key

API key in the Stripe dashboard
  1. In the bottom left corner of the dashboard, click Developers.

  2. Select API keys.

  3. In the Standard keys section, copy the Secret key value (it starts with sk_) and paste it into the Stripe API Key field in Foto.Guru.

Webhook - adding an event destination

Webhook list in the Stripe dashboard
  1. Click Developers again.

  2. Select Webhooks.

  3. Click Add destination.

Webhook - selecting events

Selecting events for the webhook
  1. Leave Your account selected as the event source.

  2. Leave the default API version.

  3. Type the event name into the search field.

  4. Tick the event that was found. Repeat steps 3 and 4 for each of the three events:

    • checkout.session.completed

    • checkout.session.async_payment_succeeded

    • checkout.session.async_payment_failed

    Once all of them are ticked, the Selected events tab should show the number 3.

  5. Click Continue.

Webhook - destination type

Choosing the event destination type
  1. Select Webhook endpoint.

  2. Click Continue.

Webhook - destination address

Configuring the event destination
  1. In the Destination name field, enter any name, e.g. FotoGuru callback.

  2. In the Endpoint URL field, paste the webhook address that Foto.Guru displays in the payment settings after selecting the Stripe operator:

    https://app.foto.guru/gateways/stripe_gateway/callback
    
  3. Click Create destination.

Webhook - signing secret

Signing secret of the created webhook

After the destination has been created, Stripe shows its details. In the Signing secret section:

  1. Click the eye icon to reveal the secret.

  2. Click the copy icon and paste the value (it starts with whsec_) into the Stripe Webhook Secret field in Foto.Guru.

Finally, save the changes in Foto.Guru. From now on, every successfully completed payment will automatically change the order status to “Paid”.