LogicLoom API Documentation

Endpoint: Create Payment

URL: https://logicloom.pro/api/payments/create

Method: POST

Content-Type: application/json

Request Headers

Content-Type: application/json

Request Body

Required JSON fields:

  • authEmail (string) - Merchant Email
  • amount (float) - Transaction amount
  • mobileNumber (string) - Customer's mobile number
  • custRefNum (string) - Unique reference number
  • custEmail (string) - Customer's email
  • custName (string) - Customer's name
  • apiKey (string) - API key for authorization

Example Request:

{
  "authEmail": "auth@merchant.com",
  "amount": 11.0,
  "mobileNumber": "9874561230",
  "custRefNum": "REF1122334479688",
  "custEmail": "customer@merchant.com",
  "custName": "Tester",
  "apiKey": "YourAPIKeyFromLogicLoom"
}

Response

Success Response (Status 200):

  • status (string) - Example: "success"
  • custRefNum (string) - Unique ID for the transaction
  • message (string) - Status update message
  • amount (float) - Amount
  • upiIntentUrl (string) - URL for UPI payment

Example Response:

{
    "status": "success",
    "custRefNum": "REF1122334479688",
    "message": "Payment initiated successfully",
    "amount": 11,
    "upiIntentUrl": "pay://payment_url"
}

Callback Notification

The system will send a callback to the specified callbackUrl with the following fields:

  • custRefNum (string) - Reference number
  • status (string) - Transaction status (e.g., success or failed)
  • amount (float) - Transaction amount
  • message (string) - Status message
  • date (datetime) - ISO 8601 timestamp

Example Callback:

{
  "custRefNum": "REF1122334479688",
  "status": "success",
  "amount": 101.00,
  "message": "Success",
  "date": "2024-11-08T09:19:03.431Z"
}

Error Codes

  • INVALID_API_KEY - API key is invalid
  • INVALID_AMOUNT - Invalid amount
  • MISSING_PARAMETERS - Required parameters are missing
  • GENERAL_ERROR - General error occurred
Sample Code