3. Setting up Stripe Gateway in Wilcity (Skip this step If you are using Purchasing Listing via WooCommerce)

Warning: By Stripe design, you cannot change a plan’s ID, Regular Price, currency, or Period Days once this plan was created. So, if you want to increase these values, We recommend creating a new plan with the same name, but different plan slug.

API Keys

In order to use the Stripe payment gateway, you must first have a Stripe.com account. It’s free to create a Stripe account, and testing it is also free.

After you created an account, log into Stripe Dashboard, to get your Stripe API to click on API from the sidebar

Unlike PayPal or 2Checkout, Stripe does not provide 2 type of accounts like Live Publishable key and Sandbox Publishable Key, instead, Stripe provides View test data mode.

Now, please log into your site, from the admin sidebar, click on Wiloke Submission  -> Looking for Stripe Settings -> Enter your API keys like this

Zero-decimal Currency

It’s very important to understand this feature.

For example, Howard Roark comes from the USA. He set up a listing plan like this

but Stripe expects amounts to be provided in a currency’s smallest unit. It means we have to convert dollar to the cent, in other words, Stripe excepts 100*20 = 200 instead of 20.

Unlike the USA, in Japan, there is no decimal for their currency so amount=1 (1 JPY), since ¥1 is the smallest currency unit. It means Stripe excepts 20 instead of 100*20.

You can find more information here https://stripe.com/docs/currencies#zero-decimal

Event Webhook

This configuration is very important. It helps to use Paid Trial  (Stripe only supports Free Trial), Downgrade and Upgrade Listing Plan.

Now, log into your Stripe account, from the Stripe Dashboard, click on API -> Webhook -> Add Endpoint -> Enter your is like this structure:

https://yourwebsite.com/?wiloke-submission-listener=stripe 

List of required WebHook:

  • checkout.session.completed
  • plan.created
  • plan.deleted
  • plan.updated
  • setup_intent.canceled
  • setup_intent.created
  • setup_intent.setup_failed
  • setup_intent.succeeded
  • customer.created
  • customer.deleted
  • customer.updated
  • customer.discount.created
  • customer.discount.deleted
  • customer.discount.updated
  • customer.source.created
  • customer.source.deleted
  • customer.source.expiring
  • customer.source.updated
  • customer.subscription.created
  • customer.subscription.deleted
  • customer.subscription.pending_update_applied
  • customer.subscription.pending_update_expired
  • customer.subscription.trial_will_end
  • customer.subscription.updated
  • customer.tax_id.created
  • customer.tax_id.deleted
  • customer.tax_id.updated
  • invoice.created
  • invoice.deleted
  • invoice.finalized
  • invoice.marked_uncollectible
  • invoice.payment_action_required
  • invoice.payment_failed
  • invoice.payment_succeeded
  • invoice.sent
  • invoice.upcoming
  • invoice.updated
  • invoice.voided
  • coupon.created
  • coupon.deleted
  • coupon.updated
  • charge.captured
  • charge.expired
  • charge.failed
  • charge.pending
  • charge.refunded
  • charge.succeeded
  • charge.updated
  • charge.dispute.closed
  • charge.dispute.created
  • charge.dispute.funds_reinstated
  • charge.dispute.funds_withdrawn
  • charge.dispute.updated
  • charge.refund.updated
  • payment_intent.payment_failed
  • payment_intent.succeeded
  • payment_intent.created
  • payment_intent.canceled
  • account.updated

Setting up Endpoint Secret

Step 1: Go to Stripe and login into account

Step 2: From the Stripe Dashboard, click on Webhooks. If you are using Sandbox mode, enabling Viewing test data then click on your Webhook url

Step 3: Copy the Secret code and paste to Endpoint Secret setting under Wiloke Submission -> Stripe

Testing Stripe

To test Stripe gateway on your site, you can use those card numbers https://stripe.com/docs/testing#cards

If you are using:

Nonrecurring Listing Plan mode and Event Plan: You can check the invoice under Payments Menu

Recurring Listing Plan: You can check the invoice under Subscriptions Menu

Final Step, Setting up Add Listing page

Leave A Comment?