Introduction

CloudlessPay is a modern payment solution designed to streamline the integration of various payment gateways without the need for server infrastructure. By utilizing CloudlessPay, developers can easily create, manage, and secure payments directly from their applications, reducing complexity and ensuring fast, reliable transactions. The platform is built with scalability in mind, allowing businesses to expand their payment options across multiple gateways such as Razorpay, PayPal, Stripe, and more, without the need for complex back-end configurations.

Why CloudlessPay?

1. Serverless Payments:
Avoid setting up server infrastructure. CloudlessPay enables secure API calls directly from your front-end.
2. Multi-Gateway Support:
Although Razorpay is the first integration, CloudlessPay is designed to support multiple payment gateways, giving you flexibility in payment processing.
3. Security:
Our APIs are designed with strong encryption, token management, and other security measures to ensure safe transactions.
4. Reduced Complexity:
You don’t need to manage your own server. CloudlessPay simplifies payment gateway interactions, reducing the technical barrier to processing secure payments.

Benefits of Using CloudlessPay

1. Faster Integration:
Developers can integrate payment services into their applications quickly and efficiently.
2. Cost-Effective:
Avoid server costs and reduce development time.
3. Secure Payment Processing:
CloudlessPay ensures that all sensitive information, such as payment credentials, is handled securely.
4. Scalability:
As your business grows, CloudlessPay grows with you, supporting multiple gateways and high volumes of transactions.

How to Use CloudlessPay?

1. Register Your Account:
Sign up for CloudlessPay to receive your API keys.
2. Set Payment Credentials:
Before you can start using any of the payment APIs, you'll need to set your gateway credentials (e.g., Razorpay Key ID and Secret Key) through a secure API endpoint.
3. Generate Access Token:
After setting up your credentials, generate an access token that will be used for all subsequent API calls.
4. Utilize APIs:
Use our API to create orders, process payments, and manage the payment lifecycle.

APIs

When Can You Use CloudlessPay API?

You can start using the CloudlessPay API once:

  • You have registered an account and securely stored your gateway credentials.
  • You have generated an access token.
  • You are ready to initiate and manage payment orders directly from your application.

Create Order

The Create Order endpoint allows you to generate a payment order with specific details, which the user will then complete via the payment gateway.

  • Endpoint: /create-order
  • Method: POST
  • Authentication: Requires a valid access token in the Authorization header.

Request Parameters:

# Parameter Type Required Description
1 amount int Yes The amount for the order. You can pass the actuall amount as integer. (50 rupees = 50)
2 currency str Yes The currency code (e.g., "INR").
3 receipt str No A unique identifier for the transaction.
4 notes dict No Additional notes to be associated with the order. This could include any metadata (e.g., customer details) that you want to track with the payment.
5 partial_payment bool No Specifies whether partial payments are allowed for this order. Defaults to False.
6 first_payment_min_amount int No The minimum amount (in smallest currency unit) required for the first payment if partial_payment is enabled.
3 payment_capture bool No Whether to automatically capture the payment. Defaults to False.

Sample Request:


{
  "amount": 100,
  "currency": "INR",
  "receipt": "receipt#1",
  "notes": {
	"customer_id": "12345",
	"order_type": "subscription"
  },
  "payment_capture": false,
  "partial_payment": false
}
								

Sample Response:


{
  "message": "Order created successfully",
  "order": {
	"amount": 10000,
	"amount_due": 10000,
	"amount_paid": 0,
	"attempts": 0,
	"created_at": 1729521113,
	"currency": "INR",
	"entity": "order",
	"id": "order_PBioIo0a3ABdhj",
	"notes": {
		"customer_id": "12345",
		"order_type": "subscription"
	},
	"offer_id": null,
	"receipt": "receipt#1",
	"status": "created"
  }
}
								

Common Errors:

# Error Code Description
1 400 Invalid request parameters or missing data or Razorpay Bad Request.
2 401 Razorpay Authentication Error
3 403 Razorpay Permission Error
4 504 Razorpay Request Timeout