docs.cresoracommerce.com/api/v1/payments-api
POST
/v1/paymentsStableCreate a payment
Create a new card or ACH payment authorization or sale.
Bearer
csk_test_ or csk_live_ requiredIdempotency: This endpoint is idempotency-safe. Include an Idempotency-Key header for all production calls.
Request
Request body
| Name | Type | Required | Description |
|---|---|---|---|
amount | integer | Required | Amount in minor units (cents). Min 1, max 99,999,999. |
currency | string | Required | ISO 4217 currency code. USD at MVP 0. |
payment_method | string | Required | card or ach_debit |
merchant_id | string | Required | MID assigned at onboarding. Format: mrch_ prefix. |
idempotency_key | string | Required (prod) | Client-generated UUID. Prevents duplicate charges. |
capture_method | string | Optional | automatic (default) or manual |
metadata | object | Optional | Key-value pairs, max 20 keys, 500 chars per value. |
statement_descriptor | string | Optional | Appears on cardholder statement. Max 22 chars. |
Response — 200 OK
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | Request body failed schema validation |
| 401 | auth_failed | Invalid or missing API key |
| 409 | idempotency_conflict | Idempotency key reused with different params |
| 422 | processing_error | Gateway declined the payment |
🔒PCI
Do not pass raw PAN data through this endpoint. Use HPP or the tokenization API to reduce scope to SAQ A.
Webhook events
payment.authorized— fires on manual capture auth-onlypayment.captured— fires on automatic or manual capturepayment.failed— fires on hard or soft decline
1curl -X POST https://api.cresoracommerce.com/v1/payments \2-H "Authorization: Bearer csk_test_xxxxxxxxxxxx" \3-H "Content-Type: application/json" \4-H "Idempotency-Key: idem_550e8400" \5-d '{6"amount": 15000,7"currency": "USD",8"payment_method": "card",9"merchant_id": "mrch_abc123",10"capture_method": "automatic",11"metadata": {12"patient_id": "pt_99887766"13}14}'
Response (200 OK)
1{2"id": "pay_7f8a9b0c1d2e3f4a",3"status": "captured",4"amount": 15000,5"currency": "USD",6"merchant_id": "mrch_abc123",7"capture_method": "automatic",8"test_mode": true,9"created_at": "2026-05-18T14:32:00Z",10"metadata": {11"patient_id": "pt_99887766"12}13}