Getting Started

Welcome to the Process Transaction API documentation. Our RESTful API allows you to integrate payment processing into your website or application quickly and securely.

Base URL

https://api.process-transaction.com/v1

Authentication

All API requests require authentication using your API key. Include your key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Response Format

All responses are returned in JSON format. Successful responses return HTTP 200 status codes.

Quick Links

SDKs

Charges

Create a Charge

POST /charges

Creates a new charge (payment) for the specified amount.

Request Parameters

Parameter Type Required Description
amount integer Yes Amount in cents (e.g., 5000 for $50.00)
currency string Yes Three-letter ISO currency code (e.g., "usd")
source string Yes Token ID or card source
description string No Description of the charge

Example Request

curl -X POST https://api.process-transaction.com/v1/charges \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 5000, "currency": "usd", "source": "tok_visa", "description": "Payment for Order #1234" }'

Example Response

{ "id": "ch_1234567890", "object": "charge", "amount": 5000, "currency": "usd", "status": "succeeded", "description": "Payment for Order #1234", "receipt_url": "https://pay.process-transaction.com/receipts/ch_1234567890", "created": 1640995200 }

Error Handling

Our API uses standard HTTP response codes to indicate the success or failure of requests.

Code Description
200 Success
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
404 Not Found - Resource doesn't exist
500 Server Error - Please try again