Create a payment intent
Creates a payment intent to orchestrate payment collection with support for 3DS/SCA authentication.
/payment-intentsCreates a payment intent to orchestrate payment collection with support for 3DS/SCA authentication.
Related endpoints
GET /payment-intents— List payment intentsGET /payment-intents/{id}— Retrieve a payment intentPOST /payment-intents/{id}/confirm— Confirm a payment intentPOST /payment-intents/{id}/capture— Capture a payment intentPOST /payment-intents/{id}/cancel— Cancel a payment intent
Common errors
400 invalid_request— malformed payload or failed validation.401 authentication_error— missing, invalid, expired, or revoked credential. Codes:authentication_failed,invalid_api_key,expired_api_key,api_key_revoked,session_invalid,merchant_required. Carries aWWW-Authenticate: Bearerchallenge.404 resource_missing— the referenced resource does not exist or is not visible to your key.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Parameters for creating a new payment intent. Specify the amount, currency, customer, and optionally a payment method and capture strategy.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.revkeen.com/v2/payment-intents" \
-H "x-api-key: $REVKEEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"customer": "11111111-1111-4111-8111-111111111111"
}'Synthetic documentation data, validated against the response schema; not a live API result.
{ "id": "pi_k3m9x2q7w8e1r4t6", "object": "payment_intent", "amount": 5880, "amount_capturable": 0, "amount_received": 5880, "currency": "gbp", "customer": "c2a1e7d4-5b3f-4a8e-9d21-6f0b3e4c7a11", "description": "INV-0042", "last_payment_error": null, "metadata": {}, "next_action": null, "payment_method": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c65", "receipt_email": "ada.lovelace@example.com", "statement_descriptor": "REVKEEN PRO", "statement_descriptor_suffix": null, "status": "succeeded", "capture_method": "automatic", "client_secret": "pi_k3m9x2q7w8e1r4t6_secret_example", "canceled_at": null, "cancellation_reason": null, "created": 1776333720, "transaction": "7b8c9d0e-1f2a-4b43-9d4e-5f6a7b8c9d42", "livemode": true}