Sdk and Plugins

Pallapay SDKs and Plugins

We provide SDKs in various programming languages to help you use Pallapay API. We also provide plugins for many eCommerce solutions.


Python SDK

https://github.com/pallapay/pallapay-python-sdk (opens in a new tab)

Usage Example:

from pallapay.client import PallapayClient
 
api_key = "TEST_API_KEY"
secret_key = "TEST_API_KEY"
 
# Create payment link
pallapay_client = PallapayClient(apiKey=api_key, secret_key=secret_key)
created_payment = pallapay_client.create_payment(
    symbol="AED",
    amount="10",
    ipn_success_url="https://my_website.com/payment/success",
    ipn_failed_url="https://my_website.com/payment/failed",
    payer_email_address="[email protected]",
    webhook_url="https://my_website.com/webhook",  # Optional
    payer_first_name="John",  # Optional
    payer_last_name="Doe",  # Optional
    note="YOUR CUSTOM NOTE",  # Optional
    order_id="YOUR_UNIQUE_ORDER_ID",  # Optional
)
 
print(created_payment.payment_link)
# https://dashboard.pallapay.com/payment/fd423e12ff9d4a33a14fcba6a4df54e2

PHP SDK

https://github.com/pallapay/pallapay-php-sdk (opens in a new tab)

Installation:

composer require pallapay/pallapay-php-sdk

Usage Example:

use Pallapay\PallapaySDK\PallapayClient;
 
$apiKey = "YOUR_API_KEY";
$secretKey = "YOUR_SECRET_KEY";
$pallapayClient = new PallapayClient($apiKey, $secretKey);
 
$createdPayment = $pallapayClient->payment()->create(
    'AED',
    '100',
    '[email protected]',
    'https://yourwebsite.com/success',
    'https://yourwebsite.com/failed',
    'https://yourwebsite.com/webhook', // Optional
    'John', // Optional
    'Doe', // Optional
    'My Custom Note', // Optional
    'Order ID' // Optional
);
 
echo $createdPayment["data"]["payment_link"];
# https://dashboard.pallapay.com/payment/fd423e12ff9d4a33a14fcba6a4df54e2

Woocommerce Plugin

https://github.com/pallapay/pallapay-woocommerce-plugin (opens in a new tab)

Magento2 Plugin

https://github.com/pallapay/pallapay-magento2-plugin (opens in a new tab)