# 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="/files/oDqPMiRPMPk1uomjGJfy" 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="/files/2tGRw6VbHoiIfl7ACShy" 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="/pages/CRgCQpVpNXSy5FVXaYpA" %}
[Payment Integration](/admin/manage-portal/app-center/payment-integration.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arthajobboard.com/admin/manage-portal/app-center/payment-integration/stripe-payment-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
