DocsAPI Reference
API Reference
Complete endpoint details for PayTree API
ENDPOINTS
Base URL
https://api.paytree.com
Authentication
Authenticate your API requests by including your secret API key in the Authorization header.
Authorization: Bearer sk_live_your_api_key
POST
/v1/paymentsCreate a new payment
Parameters:
amount, currency, description, customer_emailGET
/v1/payments/:idRetrieve a payment
Parameters:
idPOST
/v1/payments/:id/captureCapture an authorized payment
Parameters:
id, amountPOST
/v1/payments/:id/refundRefund a payment
Parameters:
id, amount, reasonGET
/v1/paymentsList all payments
Parameters:
limit, starting_after, statusPOST
/v1/checkout/sessionsCreate a checkout session
Parameters:
amount, currency, success_url, cancel_urlPOST
/v1/webhooksCreate a webhook endpoint
Parameters:
url, eventsGET
/v1/webhooksList webhook endpoints
Parameters:
limitResponse Example
{
"id": "pay_1234567890abcdef",
"object": "payment",
"amount": 10000,
"currency": "usd",
"status": "succeeded",
"description": "Order #1234",
"customer_email": "customer@example.com",
"settlement": {
"crypto": "USDC",
"amount": "100.00",
"network": "polygon",
"wallet": "0x742d35Cc6634C0532925a3b844Bc9e7595f...",
"tx_hash": "0xabc123..."
},
"metadata": {},
"created": 1704067200,
"livemode": true
}