Mock Payment & Transactions API Documentation

Welcome to the Mock Payment & Transactions API documentation. This API allows users to interact with payment and transaction processes. The data is not stored, and responses are simulated for testing purposes. This is only for mock testing and does not handle real payments or transactions.

API Overview

Base URL

The base URL for all API requests is:

https://apitpoint.com/api/

1. PayMock API

Endpoint: POST /payMock.php

This endpoint simulates making a payment. It returns a success message and payment details but does not process any real payments.

Request

Parameters

Example Request (form-data)


amount = 100.00
payment_method = "Credit Card"
        

Example Response


{
    "message": "Payment processed successfully (mock)",
    "amount": 100.00,
    "payment_method": "Credit Card",
    "status": "Success"
}
        

2. MockPay API

Endpoint: POST /mockPay.php

This endpoint simulates processing a payment. It returns a mock transaction ID and status.

Request

Parameters

Example Request (form-data)


order_id = 123
amount = 200.00
        

Example Response


{
    "message": "Payment processed successfully (mock)",
    "order_id": 123,
    "transaction_id": "TXN9876",
    "amount": 200.00,
    "status": "Completed"
}
        

3. PaymentSim API

Endpoint: POST /paymentSim.php

This endpoint simulates retrieving payment details. It returns mock payment details for a given transaction.

Request

Parameters

Example Request (form-data)


transaction_id = TXN9876
        

Example Response


{
    "message": "Payment details retrieved successfully (mock)",
    "transaction_id": "TXN9876",
    "amount": 200.00,
    "payment_method": "Credit Card",
    "status": "Completed"
}
        

4. TransactMock API

Endpoint: POST /transactMock.php

This endpoint simulates a transaction record. It returns a mock transaction record with details such as amount and status.

Request

Parameters

Example Request (form-data)


transaction_id = TXN9876
        

Example Response


{
    "message": "Transaction record retrieved successfully (mock)",
    "transaction_id": "TXN9876",
    "amount": 200.00,
    "status": "Completed",
    "date": "2024-09-05"
}