Developers
An API that just works.
Predictable REST resources, readable errors, idempotency and webhooks. Your first test payment in minutes.
Quick start
First payment in a few lines.
Amounts are in the smallest currency unit (cents). Test keys start with sk_test_, live keys with sk_live_.
# Create a payment
curl https://api.payconex-secure.us.com/v1/payments \
-u sk_test_...: \
-H "Idempotency-Key: 7f3c-..." \
-d amount=2490 \
-d currency=USD \
-d method=card \
-d description="Order #1042" \
-d return_url=https://shop.example/thanks
$payconex = new \payconex\Client('sk_test_...');
$payment = $payconex->payments->create([
'amount' => 2490,
'currency' => 'USD',
'method' => 'card',
'description' => 'Order #1042',
]);
header('Location: ' . $payment->checkout_url);
import payconex from '@payconex/node';
const zw = new payconex('sk_test_...');
const payment = await zw.payments.create({
amount: 2490,
currency: 'USD',
method: 'card',
description: 'Order #1042',
});
// Webhook: payment.succeeded
{
"id": "evt_9Lk2...",
"type": "payment.succeeded",
"data": {
"id": "pay_3Fx8...",
"amount": 2490,
"currency": "USD",
"method": "card",
"status": "succeeded"
}
}
Resources
Core API resources
| Endpoint | Description | Methods |
|---|---|---|
| /v1/payments | Create and retrieve payments | GET, POST |
| /v1/refunds | Full and partial refunds | GET, POST |
| /v1/customers | Customers and saved payment methods | GET, POST, PATCH |
| /v1/subscriptions | Recurring billing | GET, POST, PATCH, DELETE |
| /v1/payment_links | Payment links | GET, POST |
| /v1/payouts | Payouts to your bank | GET |
| /v1/webhooks | Notification endpoints | GET, POST, DELETE |
Tooling
Your developer loadout.
Sandbox
A full test environment with test cards, wallets and banks.
SDKs
Official libraries for PHP, Node.js, Python and Java.
Webhooks
HMAC-signed events with automatic retries.
Request logs
Inspect every API request and response in the dashboard.
Scoped keys
Keys restricted to specific resources and actions.