Transactions
Transaction history and refunds. All endpoints require authentication.
GET /transactions
List one-time transactions for the authenticated seller.
curl "https://api.paylinks.ro/api/v1/transactions?limit=50&status=succeeded" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Currency: RON"
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Items per page (max 100) |
cursor | string | — | Pagination cursor (transaction.id) |
status | string | all | Filter: all, succeeded, failed, refunded, disputed, uncaptured, requires_action |
Response (200):
{
"items": [
{
"id": "cm7v3q9y70000q8h6n7r3u1w2",
"amount": 4999,
"currency": "RON",
"status": "SUCCEEDED",
"paymentMethodType": "card",
"cardBrand": "visa",
"cardLast4": "4242",
"stripePaymentIntentId": "pi_1234567890",
"stripeChargeId": "ch_1234567890",
"receiptUrl": "https://pay.stripe.com/receipts/...",
"description": "Premium Course",
"createdAt": "2026-02-16T14:30:00.000Z",
"customerId": "cm7v3q9y80001q8h6z5v2h9k1",
"cardCountry": "RO",
"customer": {
"id": "cm7v3q9y80001q8h6z5v2h9k1",
"email": "[email protected]",
"name": "Ion Popescu",
"phone": "+40712345678",
"country": "RO"
}
}
],
"counts": {
"all": 120,
"succeeded": 110,
"refunded": 5,
"disputed": 2,
"failed": 3,
"uncaptured": 0
},
"nextCursor": "cm7v3q9y70000q8h6n7r3u1w2"
}
POST /transactions/:id/refund
Refund a transaction. Admin only.
curl -X POST https://api.paylinks.ro/api/v1/transactions/cm7v3q9y70000q8h6n7r3u1w2/refund \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amountMinor": 2500,
"reason": "requested_by_customer",
"refundApplicationFee": false
}'
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Transaction CUID |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
amountMinor | integer | No | Partial refund amount in minor units. Omit for full refund. |
reason | string | No | duplicate, fraudulent, or requested_by_customer |
refundApplicationFee | boolean | No | Default false. Keep platform fee when false. |
Response (200):
{
"refund": {
"id": "re_1234567890",
"status": "succeeded",
"amount": 2500,
"currency": "ron",
"charge": "ch_1234567890",
"reason": "requested_by_customer",
"created": 1765972201
}
}
Response (400/403/404): Invalid input, admin access required, or transaction not found.