Stripe Integration

Stripe is internet payment processor that allows you to accept payments using Credit Card.

Creating an Account

To be able to use Stripe with WPJobBoard you need Stripe account. The account you can create on Stripe registration page.

After registration, please login and click “API” link in the menu on the left.

This should show you all API key for your account. 

Now you must copy Live Secret Key and Live Publishable Key and paste it into your WPJobBoard configuration. To do this, go to wp-admin -> Settings (WPJB) -> Configuration. Now find section “Payment Methods” and choose “Stripe (Credit Card”). You should now see a page where you can paste Live Secret Key and Live Publishable Key. Be sure that you enabled payment method!

Here you have five options:

  • Configuration
    • Availability – Here you can enable or disabled payment method,
    • Title – Title will be visible on payment methods tab. If you will leave it blank title will be “Stripe (Credit Card)”,
    • Order – Integer that indicates the position of Stripe on payment methods tab.
  • Stripe
    • Secret Key – The first key you copied from Stripe panel,
    • Publishable Key – The second key you copied from Stripe panel.

When you filled all fields you can update and you are done. You can test if your integration is working properly by posting a new non-free job.

Recurring Payment (for memberships)

For recurring payment, we assume that you created your Stripe account following instructions above, and you properly configure Stripe integration in WPJobBoard. After this, you can go to wp-admin -> Settings (WPJB) -> Pricing. Then choose “Add New…” or “View All” near the “Employer Membership”. When you selected “View All” now you need to click “Edit” near one of the memberships you have.

Next step is to select “Recurring” option and click “Save Changes”. After this operation, you should be able to see new Plan in your Stripe dashboard (link “Subscriptions” in the menu on the left).

IMPORTANT! If you unselect “Recurring” option and click “Save Changes” plan in Stripe will be removed, and all subscriptions for this plan will be canceled. Please keep this in mind when you will be removing plan that some of your users are subscribing (they do not lose their membership, but will lose recurring membership renewal – they will need to subscribe once again).

Plans will be automatically populated to Stripe.

Plans will be automatically populated to Stripe.

If you do not see any plans, check if you have selected “Plans” tab over white area.

Next thing to do is to create Webhook for Stripe. To do this, select “API” link in the menu on the left in Stripe dashboard. Next, choose Webhooks tab from the section above white area. Now on the right you should be able to see a button “Create endpoint”. Please click that button, and a new window should pop up.

How to fill webhook

How to fill webhook

Fill the form as you can see in the image above. You will see list on the bottom when you select “Select types to send” in “Filter event” option. On list select only “invoice.payment_succeeded”. Next thing is to provide correct URL in “URL to be called”. Correct URL should look like this: “http://example.com/wp-admin/admin-ajax.php?action=wpjb_stripe_subscriptionRenew”, of course in place of “example.com” you should put your actual domain. The last thing is to click “Add endpoint”. If you correctly added webhook, you should be able to see page like this.

Correctly added webhook

Correctly added webhook

You are ready to go. Your users should be able to buy recurring Payment. A user with recurring payment will be charged every month until he cancels his subscription. After cancellation, he will be able to use his membership to end of expiration date but after this time he won’t be charged and he won’t receive new membership.

Leave a Reply

Your email address will not be published. Required fields are marked *