> For the complete documentation index, see [llms.txt](https://docs.papelship.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.papelship.com/docs-1/integrations/wordpress.md).

# Wordpress

The official PapelShip WordPress plugin provides dual-mode payment functionality:

1. **Standalone WordPress Mode (No WooCommerce Required):** Embed high-speed PapelShip modal checkout buttons anywhere across WordPress pages, blog posts, Gutenberg blocks, and Elementor widgets using simple shortcodes.
2. **WooCommerce Gateway Mode (Optional):** If WooCommerce is installed and active on your website, PapelShip automatically registers as a native checkout payment gateway for regular store carts.

## Video Walkthrough

Watch the complete step-by-step video tutorial covering installation, shortcode placement, and WooCommerce gateway configuration:

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

## Prerequisites

* **WordPress:** Version 5.8 or higher.
* **WooCommerce:** Optional (only required if you wish to use the traditional cart checkout gateway).
* **PHP:** Version 7.4 or higher.
* **SSL Certificate:** Active HTTPS connection.
* **PapelShip Account:** An active store on PapelShip.

## Download Package

Download the official plugin archive:

* **Download URL:** <https://app.papelship.com/downloads/papelship-payment-gateway.zip>
* **Filename:** `papelship-payment-gateway.zip`
* **Version:** `1.0.0`

## Installation

{% stepper %}
{% step %}

## Log in to WordPress

Log in to your WordPress Admin Dashboard.
{% endstep %}

{% step %}

## Add a plugin

Navigate to **Plugins > Add New**.
{% endstep %}

{% step %}

## Upload the plugin

Click the **Upload Plugin** button at the top of the page.
{% endstep %}

{% step %}

## Choose the archive

Click **Choose File** and select `papelship-payment-gateway.zip`.
{% endstep %}

{% step %}

## Install and activate

Click **Install Now**, then click **Activate Plugin**.
{% endstep %}
{% endstepper %}

## Mode 1: Standalone WordPress (Shortcodes & Buy Buttons)

You do **not** need WooCommerce installed to sell digital products, subscriptions, or license keys. Once the plugin is activated, you can place checkout buttons in any page, post, or builder.

### Single Product Buy Button

```html
[papelship_product id="uHY0FHSvyqVA" store="your-store-slug"]Buy License[/papelship_product]
```

When clicked, this button triggers a modal checkout overlay where customers select Credit Card, Papara, Bank Wire, or Cryptocurrency.

### Product Group / Bundle Selection Modal

```html
[papelship_group id="14" store="your-store-slug"]View Packages[/papelship_group]
```

### Shortcode Parameters

| Parameter | Required          | Description                                    | Default             |
| --------- | ----------------- | ---------------------------------------------- | ------------------- |
| `id`      | Yes (for product) | Product Hash ID from your PapelShip Dashboard. | —                   |
| `group`   | Yes (for group)   | Group ID from your PapelShip Dashboard.        | —                   |
| `store`   | Yes               | Your unique store slug identifier.             | —                   |
| `class`   | No                | Custom CSS class names for styling.            | `papelship-buy-btn` |
| `style`   | No                | Inline CSS styles.                             | —                   |

## Mode 2: WooCommerce Cart Checkout Gateway (Optional)

If your WordPress site uses WooCommerce for catalog sales and physical/digital cart management, PapelShip can be configured as a payment gateway.

### Gateway Configuration

{% stepper %}
{% step %}

## Open payment settings

In WordPress Admin, navigate to **WooCommerce > Settings > Payments**.
{% endstep %}

{% step %}

## Manage PapelShip

Locate **PapelShip** and click **Manage**.
{% endstep %}

{% step %}

## Configure credentials

Configure the credentials:

* **Store Hash ID:** Your 12-character store ID (e.g. `k5zWnAMG5Cbp`).
* **API Key:** Secret API key generated in PapelShip (`psa_live_...`).
* **Webhook Secret:** Webhook secret token (`whsec_...`).
  {% endstep %}

{% step %}

## Save changes

Click **Save changes**.
{% endstep %}
{% endstepper %}

### Webhook Configuration

{% stepper %}
{% step %}

## Copy the callback URL

Copy the webhook callback URL displayed in your WooCommerce settings:

```
https://yourdomain.com/?wc-api=papelship_webhook
```

{% endstep %}

{% step %}

## Configure the webhook

In your **PapelShip Dashboard > Store Settings > Webhooks**, paste this URL and save.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
PapelShip automatically updates WooCommerce order statuses to **Processing** or **Completed** upon cryptographic webhook verification.
{% endhint %}

## Testing & Troubleshooting

1. For shortcodes: visit the page containing the `[papelship_product]` shortcode and confirm the PapelShip checkout overlay opens properly.
2. For WooCommerce: place a test order on the checkout page selecting PapelShip.
3. If callbacks fail, verify that incoming requests to `/?wc-api=papelship_webhook` are not blocked by security plugins (e.g., Wordfence, Cloudflare WAF).
