PAYRAM
API SPECS
  • INTRODUCTION
    • 👋PAYRAM
    • 💡Getting Started
      • Setup
      • YAML Configuration
      • Wallet Configuration
      • Reset Setup
      • Update PayRam Server
      • Check your Database
      • Project API Keys
      • Webhook Integration
      • 🦊Test Wallet Setup
  • PAYMENT INTEGERATION
    • 📪Payments Flow
    • 🎌Integrating Payments
      • Implementing the Payment Form
      • Generating a Payment Link
      • Get Payment Details
      • Checking Payment Status
      • Webhook
  • REFERRAL INTEGRATION
    • 👬Referral Flow
    • Create New Campaign
      • Embed the Referral Dashboard
      • Link Referrers to Referees
      • Trigger Events
  • Fund Management
    • 🛠️Smart Consolidation
    • ⛽GAS Station
    • 👮‍♀️Policy Management
  • DEVELOPERS
    • 🎨API Reference
    • 🧪Test Faucets
  • SUPPORT
    • ⁉️FAQ
      • Deployment FAQ's
      • Configuration FAQ's
      • API Integration FAQ's
      • Fund Management FAQ's
      • Referral FAQ's
      • Debug FAQ's
    • 📅Change Log
Powered by GitBook
On this page
  1. PAYMENT INTEGERATION
  2. Integrating Payments

Generating a Payment Link

Merchant's Backend - Payment Session Creation

  1. Include a form on the client side (app, dapp, or webpage) to gather and send the order details to the merchant's backend. Add a custom "Pay with Payram" button for the payment option.

  2. On the merchant's server side, implement the logic to process the form data and send a POST request to your Payram backend server to create a payment session.

  3. To obtain a payment link, the merchant's backend needs to send a request with the customer's email, Customer ID, and the payment amount. Sample Request and Response for payment session creation

Get_Payment_Link
curl --location 'https://yourdomain.com/api/v1/payment' \
--header 'API-Key: api_key' \
--header 'Content-Type: application/json' \
--data '{
    "customerEmail": "abc12@gmail.com",
    "customerId": "abc12456",
    "amountInUSD": 24.334
}'
Get_Payment_Link
{
    "host": "https://yourdomain.com",
    "reference_id": "b233fe9a-2387-4279-aa39-ddea0ab7bba1",
    "url": "https://yourdomain.com/payments?reference_id=b233fe9a-2387-4279-aa39-ddea0ab7bba1&host=https://yourdomain.com"
}

  1. When the response is received, extract the reference_id and store it in your database to track payments.

  2. Then, retrieve the payment URL and redirect the user to that link.

PreviousImplementing the Payment FormNextGet Payment Details

Last updated 29 days ago

🎌