# Stripe Payment Gateway

Here's the tutorial followed by the steps.

{% embed url="<https://youtu.be/qGEnpEccTHc>" %}

### Step 1: Connecting Stripe with your Job Board

You need to connect Stripe App by following the given steps.

* Visit the admin panel and navigate to Manage Portal
* Click on App Center → Payment integration&#x20;
* Now Click on Stripe and Connect&#x20;

### Step 2: Login to your Stripe account

<figure><img src="https://2082584992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3TjBKG14VRZgguFLwlBD%2Fuploads%2FbnfXKNvsbaA5Dj88eyVE%2Fimage.png?alt=media&#x26;token=41795665-7f8c-4a5c-a066-792421a21228" alt=""><figcaption></figcaption></figure>

* Sign in to your [Stripe account](https://dashboard.stripe.com/).
* In the left menu, click on Developers → API keys.
* Under Standard Keys, you’ll see your Publishable Key.
* To reveal your Secret Key, click the Reveal live key token button.

If your Secret Key is restricted, you will need to generate a Restricted Key with the necessary permissions. You need to follow these steps:

1. Generate a Restricted Key (If Needed)
2. Go to the Stripe Dashboard and navigate to Developers → API keys. Click Create Restricted Key.
3. Give your key a name (e.g., "Artha Job Board Restricted Key").
4. Select the necessary permissions based on your use case.
5. Common permissions for payment processing: checkout.sessions → Read & Write payment\_intents → Read & Write events → Read. Click Create Key and securely store the key.

If your restricted key does not have the right permissions, some API calls may fail, so be sure to grant the right level of access.

### Step 3: Setup Webhook

* Navigate to Developers → Webhooks in the left sidebar.
* Click on the Add Endpoint button.
* Select the following event and enter the respective webhook URL.

<figure><img src="https://2082584992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3TjBKG14VRZgguFLwlBD%2Fuploads%2FBqsr46VR3WdqT6SYj8Ya%2Fimage.png?alt=media&#x26;token=427b128e-5b3a-483a-b765-62887741e9b1" alt=""><figcaption></figcaption></figure>

**Webhook URL for success**

<https://subscriptions-payment.arthajobboard.com/api/v1/webhook/subscription/payment-intent/succeded\\>
**Event**: invoice.payment\_succeeded

***

**Webhook URL for fail**\
\
<https://subscriptions-payment.arthajobboard.com/api/v1/webhook/subscription/payment-intent/failed\\>
**Event**: invoice.payment\_failed

***

Webhook URL for canceled\
\
<https://subscriptions-payment.arthajobboard.com/api/v1/webhook/subscription/renewal/canceled\\>
**Event**: customer.subscription.deleted

***

Webhook for Top-Up and One-time package license

<https://api.arthajobboard.com/webhook/stripe/verify\\>
**Event**:  checkout.session.completed

***

***

### Step 4: Retrieve Webhook Secret Key

After adding the endpoint, you’ll see it listed in your webhook settings.

* Click on the newly created webhook endpoint.
* Under Signing Secret, click Reveal.
* Copy the Webhook Signing Secret for checkout.session.completed. This will be used to verify events from Stripe.

### Step 5: Connect App

After configuring the Stripe and obtaining the keys switch back to App center in Artha&#x20;

* In the App connection side drawer
  * Add Secret key
  * Add Endpoint Secret - The webhook Secret key. \[Webhook for Top-Up and One-time package license]
  * Add Publishable Key&#x20;
* Click on connect&#x20;

The integration is complete now.<br>

{% content-ref url="" %}
[](https://docs.arthajobboard.com/admin/manage-portal/app-center/payment-integration)
{% endcontent-ref %}
