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
In the bottom left corner of the dashboard, click Developers.
Select API keys.
In the
Standard keyssection, copy theSecret keyvalue (it starts withsk_) and paste it into theStripe API Keyfield in Foto.Guru.
Webhook - adding an event destination
Click Developers again.
Select Webhooks.
Click Add destination.
Webhook - selecting events
Leave Your account selected as the event source.
Leave the default API version.
Type the event name into the search field.
Tick the event that was found. Repeat steps 3 and 4 for each of the three events:
checkout.session.completedcheckout.session.async_payment_succeededcheckout.session.async_payment_failed
Once all of them are ticked, the
Selected eventstab should show the number 3.Click Continue.
Webhook - destination type
Select Webhook endpoint.
Click Continue.
Webhook - destination address
In the
Destination namefield, enter any name, e.g.FotoGuru callback.In the
Endpoint URLfield, paste the webhook address that Foto.Guru displays in the payment settings after selecting theStripeoperator:https://app.foto.guru/gateways/stripe_gateway/callback
Click Create destination.
Webhook - signing secret
After the destination has been created, Stripe shows its details. In the Signing secret section:
Click the eye icon to reveal the secret.
Click the copy icon and paste the value (it starts with
whsec_) into theStripe Webhook Secretfield 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”.