razorpayconnector
Service icon

RazorpayConnector

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 28 Nov (16 hours ago)
 by 
Eone Technologies pvt ltd
0.0
 (0 ratings)
razorpayconnector

RazorpayConnector

Documentation
1.0.0

🧾 Overview

The Razorpay Connector is a reusable OutSystems component that simplifies integrating Razorpay’s payment gateway into your Reactive, Mobile, or Traditional Web applications.
It provides ready-to-use server actions for securely creating orders, capturing payments, processing refunds, and validating webhook signatures—without having to manually configure HTTP requests or authentication.

This connector is designed to reduce integration time, ensure secure API communication, and offer a production-ready starting point for any payment functionality in OutSystems applications.


🚀 Key Features

🔸 Order Management

  • Create Razorpay Orders with amount, currency, and receipt details

  • Retrieve Order details

  • Fetch payments linked to an Order

🔸 Payment Operations

  • Fetch payment status by Payment ID

  • Capture an authorized payment

  • Handle partial and full payment captures

🔸 Refund Operations

  • Initiate complete or partial refunds

  • Fetch refund details

  • List all refunds for a payment

🔸 Webhook Verification

  • Validate Razorpay webhook signatures using HMAC SHA256

  • Prevent tampering and spoofing of payment events

  • Works for all Razorpay webhook event types

🔸 Authentication Support

  • Built-in Basic Authentication using:

    • Key ID

    • Key Secret

🔸 Fully Configurable

  • Runtime configuration through Site Properties

  • Easy to integrate into any OutSystems app

  • No platform-specific customization required


🧩 Included Components

1. Core API Module

Contains all REST integrations and public server actions:

  • CreateOrder

  • GetOrder

  • GetOrderPayments

  • CapturePayment

  • GetPayment

2. Data Structures

Models for:

  • Order Request / Response

  • Payment Details

  • Refund Request / Response

  • Webhook Payload

  • Error Handling Objects



🔒 Security

  • Uses Basic Authentication for all Razorpay API calls

  • Webhook verification uses secure HMAC SHA256

  • Supports both development and production keys

  • Detailed error messages for failed verifications


⚙️ How It Works

1. Create Razorpay Order

Your application calls CreateOrder, which:

  • Sends order details to Razorpay

  • Returns order_id used by Razorpay Checkout

2. User Completes Payment

You display Razorpay’s Checkout widget using the returned order_id.

3. Capture or Fetch Payment

After checkout completes:

  • Use GetPayment to validate payment

  • OR use CapturePayment if auto-capture is disabled

4. Receive Webhooks (Recommended)

Webhook action:

  • Receives Razorpay event

  • Validates the signature

  • Processes status updates
    (Example: payment authorized, captured, refunded etc.)


🛠️ Setup Requirements

  • Razorpay Account

  • Razorpay API Key ID & Secret

  • Webhook Secret (if using webhooks)

  • OutSystems 11+ (Reactive/Mobile/Web supported)


📘 Configuration

Site Properties

  • Razorpay_KeyId

  • Razorpay_KeySecret

  • Razorpay_WebhookSecret

Optional Settings

  • Enable/Disable logging

  • Currency configuration

  • Environment mode (Test / Live)


📊 Error Handling

All API calls return:

  • IsSuccess (Boolean)

  • StatusCode

  • ResponseMessage

  • Detailed Razorpay error object (if provided)

This ensures easy debugging and graceful handling of payment workflow failures.


🧪 Demo Application Features

  • Create a test order

  • Open Razorpay Checkout from OutSystems

  • Verify payment using Payment ID

  • View success/failure states

  • Test webhook signature verification

Perfect for quick onboarding or training teams on Razorpay integration.


📦 Use Cases

  • E-commerce checkout

  • Subscription payments

  • Wallet top-ups

  • Invoice payment portals

  • Donation platforms

  • Booking systems