Update a payment intent

Updates a payment intent. Only certain fields can be updated based on the intent's status. --- **Related endpoints** - `POST /payment-intents` — Create a payment intent - `GET /payment-intents` — List payment intents - `GET /payment-intents/{id}` — Retrieve a payment intent - `POST /payment-intents/{id}/confirm` — Confirm a payment intent - `POST /payment-intents/{id}/capture` — Capture a payment intent - `POST /payment-intents/{id}/cancel` — Cancel a payment intent **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `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](/docs/fundamentals/idempotency).

POST
/payment-intents/{id}

Updates a payment intent. Only certain fields can be updated based on the intent's status.


Related endpoints

  • POST /payment-intents — Create a payment intent
  • GET /payment-intents — List payment intents
  • GET /payment-intents/{id} — Retrieve a payment intent
  • POST /payment-intents/{id}/confirm — Confirm a payment intent
  • POST /payment-intents/{id}/capture — Capture a payment intent
  • POST /payment-intents/{id}/cancel — Cancel a payment intent

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 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.

x-api-key<token>

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

Path Parameters

id*string

Payment intent ID (pi_xxx)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Parameters for updating a payment intent before confirmation. Only amount, description, payment method, and metadata can be changed.

Response Body

application/json

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X POST "https://api.revkeen.com/v2/payment-intents/string" \
  -H "x-api-key: $REVKEEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 0,
    "currency": "string",
    "payment_method": "00000000-0000-0000-0000-000000000000",
    "description": "string",
    "statement_descriptor": "string",
    "statement_descriptor_suffix": "string",
    "receipt_email": "customer@example.com",
    "metadata": {}
  }'
{  "id": "string",  "object": "payment_intent",  "amount": 0,  "amount_capturable": 0,  "amount_received": 0,  "currency": "string",  "customer": "0ac6320b-fa4d-4235-8d23-413a2b863bad",  "description": "string",  "last_payment_error": {    "code": "string",    "message": "string",    "decline_code": "string",    "payment_method": {      "id": "string",      "type": "string"    }  },  "metadata": {},  "next_action": {    "type": "redirect_to_url",    "redirect_to_url": {      "url": "http://example.com",      "return_url": "http://example.com"    }  },  "payment_method": "f4815f3e-3832-4ed6-92fd-134ab34dea26",  "receipt_email": "user@example.com",  "statement_descriptor": "string",  "statement_descriptor_suffix": "string",  "status": "requires_payment_method",  "capture_method": "automatic",  "client_secret": "string",  "canceled_at": "2019-08-24T14:15:22Z",  "cancellation_reason": "duplicate",  "created": 0,  "livemode": true}

List payment intents GET

Returns a list of payment intents with optional filtering. --- **Related endpoints** - `POST /payment-intents` — Create a payment intent - `GET /payment-intents/{id}` — Retrieve a payment intent - `POST /payment-intents/{id}` — Update a payment intent - `POST /payment-intents/{id}/confirm` — Confirm a payment intent - `POST /payment-intents/{id}/capture` — Capture a payment intent - `POST /payment-intents/{id}/cancel` — Cancel a payment intent **Common errors** - `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 a `WWW-Authenticate: Bearer` challenge. **Pagination** Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.

Activate a payment link (deprecated) POST

**Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: "active"` instead.** This convenience endpoint will be removed in a future API version. Enable a payment link to accept payments. Cannot be used on archived links. --- **Related endpoints** - `POST /payment-links` — Create a new payment link - `GET /payment-links` — List payment links - `GET /payment-links/{id}` — Get payment link by ID - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated) - `PATCH /payment-links/{id}/status` — Update payment link status - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated) - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated) **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 a `WWW-Authenticate: Bearer` challenge. - `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](/docs/fundamentals/idempotency).