Developers
tab link and select API keys
in the left sidebar.
Here you can find two keys - public and secret.
Public key is required by the client-side stripe library (for example - a payment form to purchase a product or add a card for later use).
(Ship uses client-side stripe library to display add card form)
Secret key is used to interract with stripe using application’s server.
Copy them and store in web’s (public key) configs and server’s configs (secret key)
+ Add endpoint
button.
Type URL of the endpoint, responsible for listening for the stripe events (Default ship URL is HTTPS://<server_url>/webhook/stripe
).
Add events that you want to listen to. Ship listens for the following events -
setup_intent.succeeded
Triggers when a customer adds a new card using stripe form on the web application.customer.subscription.create
Triggers when a customer’s subscription createdpayment_method.attached
Triggers when a customer adds a new card during the payment process on stripe checkout pagecustomer.subscription.updated
Triggers when a customer’s subscription changescustomer.subscription.deleted
Triggers when a customer’s subscription is deleted.+ Add product
in the top right corner.
Add product name and, optionally, description and image.
Next, add price information. To create a basic subscription with recurring payments, select pricing model Standard pricing
, add price and currency, select Recurring
option below the price, and select Billing period.
Stripe allows to setup several prices for product. Ship uses subscripti ons with two payment periods - monthly and yearly, therefore stripe product should has two prices. Click the button + Add another price
at the bottom and fill in the second form. Make sure prices have Monthly
and Yearly
billing periods