CresoraCresora Commerce
docs.cresoracommerce.com/api/v1/payments-api
POST/v1/paymentsStable

Create a payment

Create a new card or ACH payment authorization or sale.

Bearer csk_test_ or csk_live_ required

Idempotency: This endpoint is idempotency-safe. Include an Idempotency-Key header for all production calls.

Request

Request body

NameTypeRequiredDescription
amount
integerRequiredAmount in minor units (cents). Min 1, max 99,999,999.
currency
stringRequiredISO 4217 currency code. USD at MVP 0.
payment_method
stringRequiredcard or ach_debit
merchant_id
stringRequiredMID assigned at onboarding. Format: mrch_ prefix.
idempotency_key
stringRequired (prod)Client-generated UUID. Prevents duplicate charges.
capture_method
stringOptionalautomatic (default) or manual
metadata
objectOptionalKey-value pairs, max 20 keys, 500 chars per value.
statement_descriptor
stringOptionalAppears on cardholder statement. Max 22 chars.

Response — 200 OK

Error responses

StatusCodeMeaning
400validation_errorRequest body failed schema validation
401auth_failedInvalid or missing API key
409idempotency_conflictIdempotency key reused with different params
422processing_errorGateway 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

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}
Try it

Paste your csk_test_ key to execute sandbox calls.

Result will appear here…