This page provides an overview of the payment processing API available on our platform. It includes details on the endpoints, parameters, and request/response formats.

Endpoints

  • Create Payment

    • URL: /api/payment/create
    • Method: POST
    • Description: This endpoint is used to create a new payment transaction.
    • Parameters:
      • amount: The amount to be processed (required, number)
      • currency: The currency of the transaction (required, string)
      • customer_id: The ID of the customer (required, string)
      • payment_method: The payment method used (required, string)
  • Retrieve Payment

    • URL: /api/payment/retrieve
    • Method: GET
    • Description: This endpoint is used to retrieve payment details by transaction ID.
    • Parameters:
      • transaction_id: The ID of the transaction (required, string)

Request and Response Formats

Create Payment Request

{
  "amount": 100.00,
  "currency": "USD",
  "customer_id": "c12345",
  "payment_method": "credit_card"
}

Create Payment Response

{
  "status": "success",
  "transaction_id": "t12345",
  "amount": 100.00,
  "currency": "USD"
}

Retrieve Payment Response

{
  "status": "success",
  "transaction_id": "t12345",
  "amount": 100.00,
  "currency": "USD",
  "customer_id": "c12345",
  "payment_method": "credit_card",
  "created_at": "2023-01-01T12:00:00Z"
}

Usage Example

To create a new payment, you would send a POST request to /api/payment/create with the necessary parameters. To retrieve payment details, you would send a GET request to /api/payment/retrieve with the transaction ID.

For more information on how to use these endpoints, please refer to our API Reference.


Payment Processing