Payatom
  • PayAtom
    • India
      • Payin
      • Payout
    • Bangladesh
      • Payin
      • Payout
  • API Integration
    • India
      • Payin P2P Seamless UPI Integration
      • Payin P2P Non-Seamless UPI Integration
      • Payin P2P Non-Seamless IMPS Integration
      • Payout P2P Seamless IMPS Integration
      • Payin P2C Seamless UPI Integration
      • Payin P2C Non-Seamless UPI Integration
      • Payout P2C Seamless UPI Integration
    • Bangladesh
      • Payin P2P Seamless Wallet Integration
      • Payin P2P Non-Seamless Wallet Integration
      • Payout P2P Seamless wallet Integration
      • Payin P2C Seamless Wallet Integration
      • Payin P2C Non-Seamless Wallet Integration
      • Payout P2C Seamless wallet Integration
    • Pakistan
      • Pakistan H2H Integration
    • P2P Accounts Wallet Balance
    • Complaint
    • Payin Reconciliation
    • Payout Reconciliation
    • Wallet Transaction Summary
    • Wallet Data Endpoint
Powered by GitBook
On this page
  • GENERAL FLOW :
  • SECURITY CONSIDERATIONS :
  • Submit Complaint
  • View Complaint Info
  • SIGNATURE GENERATION :
  1. API Integration

Complaint

GENERAL FLOW :

  • These APIs allow merchants to manage transaction-related complaints efficiently.

  • Merchants can submit complaints using the Submit Complaint API by providing relevant details and optional evidence, such as complaint descriptions and images.

  • Once a complaint is submitted, a unique complaint reference ID is generated.

  • This reference ID can be used to track the status and updates of the complaint through the status-check API.

  • The APIs provide a secure and streamlined process for reporting and resolving transaction issues.

  • Merchants receive real-time responses and status updates regarding the complaint.

SECURITY CONSIDERATIONS :

All APIs in this document follow these common security protocols:

  1. HTTPS Requests: All requests are secured and must be sent over HTTPS.

  2. POST Method Only: Only POST requests are permitted for API interactions.

  3. API Header Requirements: Each request must include the following:

    • Token: The provided authentication token.

    • Content-Type: Set to application/json.

  4. Signature Verification:

    • A signature hash must accompany the request parameters for verification.

    • Details of the signature verification process can be found at the end of this document.


  1. Submit Complaint

  • The Complaint Submission API enables merchants to submit transaction-related complaints.

  • Merchants must provide essential details such as pid, order_id, ref_code, and signature for verification.

  • Optionally, merchants can include a detailed complaint_description and attach supporting evidence through base64-encoded screenshot_images.

  • Upon successful submission, the API processes the complaint and logs it into the system.

  • A unique complaint reference ID is generated, allowing the merchant to track the status of the complaint.

Submit Complaint

POST https://<domain>/api/complaint/submit_complaint.php

The Complaint Submission API enables merchants to submit transaction-related complaints.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Mandatory

pid

string

Merchant’s unique PID

Yes

order_id

string

The customer order ID of the transaction related to the complaint.

Yes

ref_code

string

The unique reference code of the transaction

Yes

signature

string

Generated signature for verification (signature generation process provided at the end of the documentation)

Yes

complaint_description

string

A detailed description of the complaint

No

screenshot_images

array

Array of base64-encoded images related to the complaint (JPEG/PNG)

No

Note : screenshot_images must be an array and base64-encoded.

Sample Request

{
  "pid": "095127238648392",
  "order_id": "ORD10001",
  "ref_code": "90djjwiw5cc079872e6d049746c38d8a8ad8dcc51d5f85aaxdnnwz9",
  "signature": "d3b07384d113edec49eaa6238ad5ff00...",
  "complaint_description": "Payment issue description",
  "screenshot_images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...",
    "data:image/png;base64,jJSLK342LKJ9sYFwO4fD==..."
  ]
}

Response

{
    "status": "success",
    "message": "Complaint submitted successfully",
    "complaint_reference_id": "3787b74e09eb442f7ba0c74e2zx38dnjdwd8b177f5161b499djjw"
}
//400 Bad Request: If required fields are missing.
//401 Unauthorized: If authentication fails.
//500 Internal Server Error: In case of a server issue.

{
    "status": "error",
    "message": "Verification failed"
}
  1. View Complaint Info

  • The Complaint Status API enables merchants to retrieve the status of a previously submitted complaint.

  • Merchants must use the complaint reference ID provided upon successful complaint submission.

  • The API provides the following details:

    • Status of the complaint.

    • Comments made on the complaint.

    • Any screenshot images submitted with the complaint.

    • Associated transaction details related to the complaint.

View Complaint Info

POST /https://<domain>/api/complaint/complaint_info.php

The Complaint Status API enables merchants to retrieve the status of a previously submitted complaint.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Mandatory

pid

string

Merchant's unique PID.

Yes

complaint_reference_id

string

The complaint reference ID provided after successful complaint submission.

Yes

signature

string

Signature for verification (signature generation process provided at the end of the documentation).

Yes

Sample Request

{
    "pid": "3787b74e09eb442f7ba0c74e2zx38dnjdwd8b177f5161b499djjw",
    "complaint_reference_id": "3787b74e09eb442f7ba0c74e2zx38dnjdwd8b177f5161b499djjw",
    "signature": "d3b07384d113edec49eaa6238ad5ff00...."
}

Sample Response

{
    "status": "success",
    "complaint_statistics": {
        "complaint_details": [
            {
                "complaint_registered_time": "17-09-2024 06:39:42 AM",
                "complaint_updated_time": "17-09-2024 07:10:54 AM",
                "complaint_status": "Resolved",
                "complaint_reference_id": "3787b74e09eb442f7ba0c74e2zx38dnjdwd8b177f5161b499djjw ",
                "screenshot_images": [
                    {
                        "added_time": "17-09-2024 06:39:42 AM",
                        "image_link": "https://money.payatom.in/admin/image_upload/img_path.php?code=jd9302e2d440dde234a1ae99c203c17f48d2k202e-odwd302e2"
                    }
                ],
                "comments": [
                    {
                        "added_time": "17-09-2024 06:39:42 AM",
                        "complaint_description": " Payment issue description "
                    },
                ]
            }
        ],
        "order_details": [
            {
                "transaction_requested_time": "17-09-2024 06:06:35 AM",
                "transaction_updated_time": "17-09-2024 07:10:37 AM",
                "amount_requested": "200",
                "amount_received": "200",
                "received_upi": "smsmnwu@ibl",
                "sender_upi": "demo@upi",
                "internal_order_id": "xxmx",
                "customer_order_id": "2VCCPBFAS2H24",
                "transaction_status": "Late Approved",
                "ref_code": "e3543231e6041b6c17001c6de6b6a2e04c3eb0d5ed3e39d23ade20ccb3b0f53a"
            }
        ],
        "operator_log": [
            {
                "activity_time": "17-09-2024 06:26:37 AM",
                "transaction_amount": "0",
                "user_type": "Automated",
                "operator_email": "Timeout",
                "old_status": "Pending",
                "new_status": "User Timed Out",
                "previous_balance": 19167100
            },
            {
                "activity_time": "17-09-2024 07:10:37 AM",
                "transaction_amount": "200",
                "user_type": "xxx",
                "operator_email": "xxx",
                "old_status": "User Timed Out",
                "new_status": "Late Approved",
                "previous_balance": 19172800
            }
        ],
        "webhook_log": [
            {
                "time": "17-09-2024 06:27:19 AM",
                "payment_status": "User Timed Out",
                "http_code": "200",
                "retry_count": "0",
                "redirect_url": " https://redirect//...""
            },
            {
                "time": "17-09-2024 07:11:21 AM",
                "payment_status": "Late Approved",
                "http_code": "200",
                "retry_count": "0",
                "redirect_url": "https://redirect//..."
            }
        ]
    }
}
//400 Bad Request: If required fields are missing.
//401 Unauthorized: If authentication or signature verification fails.
//500 Internal Server Error: In case of a server issue.
{
    "status": "error",
    "message": "Invalid Complaint Reference ID"
}

SIGNATURE GENERATION :

  1. For Complaint Submit API

  • Concatenate request parameters pid, ref_code and order_id along with the secret_key of merchant.

  • Hash the concatenated string using sha256 to create the signature.

PHP Example

function generateSignature($pid, $secret_key, $ref_code, $order_id)
{

//Concatenate the inputs
$data = $pid . $secret_key . $ref_code . $order_id;
//Generate SHA-256 hash
    $signature = hash('sha256',  $data);
    return  $signature;
}

//Example usage
$pid = "your_pid";
$secret_key = "your_secret_key";
$ref_code = "your_ref_code";
$order_id = "your_order_id" ;
$signature = generateSignature($pid, $secret_key, $ref_code, $order_id);
echo $signature;

Python Example

import hashlib

def generate_signature(pid, secret_key, ref_code, order_id):
    # Concatenate the inputs
    data = pid + secret_key + ref_code + order_id
    # Generate SHA-256 hash
    signature = hashlib.sha256(data.encode()).hexdigest()
    return signature

# Example usage 
pid = "your_pid" 
secret_key = "your_secret_key"
ref_code = "your_ref_code"
order_id = "your_order_id" 

print(generate_signature(pid, secret_key, ref_code, order_id))
  1. For Complaint info API

  • Concatenate request parameters pid and complaint_reference_id along with the secret_key of merchant.

  • Hash the concatenated string using sha256 to create the signature

PHP Example

function generateSignature($pid, $secret_key, $complaint_reference_id)
{

//Concatenate the inputs
$data = $pid . $secret_key . $complaint_reference_id;
//Generate SHA-256 hash
    $signature = hash('sha256',  $data);
    return  $signature;
}

//Example usage
$pid = "your_pid";
$secret_key = "your_secret_key";
$complaint_reference_id = "your_complaint_reference_id";
$signature = generateSignature($pid, $secret_key, $complaint_reference_id);
echo $signature;

Python Example

import hashlib

def generate_signature(pid, secret_key, complaint_reference_id):
    # Concatenate the inputs
    data = pid + secret_key + complaint_reference_id
    # Generate SHA-256 hash
    signature = hashlib.sha256(data.encode()).hexdigest()
    return signature

# Example usage 
pid = "your_pid" 
secret_key = "your_secret_key"
complaint_reference_id = "your_complaint_reference_id"

print(generate_signature(pid, secret_key, ref_code, order_id))
PreviousP2P Accounts Wallet BalanceNextPayin Reconciliation

Last updated 8 months ago