---
title: "Charge a saved card off-session"
method: POST
path: "/api/v1/payments"
tags: ["Payments"]
---

# Charge a saved card off-session

`POST /api/v1/payments`

## Request

- Base URL: `https://merchant.zahlo.eu`
- URL: `https://merchant.zahlo.eu/api/v1/payments`
- Auth: API key in header `x-api-key`

Charges a card saved at checkout without the customer present. Requires an Idempotency-Key. 201: succeeded; 202: the outcome is still unknown, `payment.confirmed` or `payment.failed` follows; 402 `card_declined` or `authentication_required` (bring the customer back to Checkout).

## Headers

- `Idempotency-Key` string

## Request body

- OffSessionPaymentRequest
  - `customerId` string, required
  - `paymentMethodId` string, required: A card saved with setupFutureUsage or a setup session.
  - `amountMinor` integer, required
  - `currency` string, required
  - `reference` string
  - `metadata` object
  - `offSession` true, required

## Response `201`

The succeeded payment

- Payment: A payment attempt from a checkout session, payment link or subscription period; the same object the payment.* events carry. Its id is also the checkout session id.
  - `id` string, required
  - `object` 'payment', required
  - `livemode` boolean, required
  - `createdAt` string, date-time, required
  - `status` 'pending' | 'succeeded' | 'failed' | 'cancelled', required
  - `amountMinor` integer, required
  - `amountRefundedMinor` integer, required
  - `refunded` boolean, required
  - `currency` string, required
  - `paymentMethod` object, nullable
    - `type` string
  - `outcome` object
    - `threeDSecure` string, nullable
    - `riskLevel` string, nullable
    - `providerReason` string, nullable
  - `customerId` string, nullable
  - `subscriptionId` string, nullable
  - `checkoutSessionId` string, nullable
  - `paymentLinkId` string, nullable
  - `receiptNumber` string, nullable
  - `receiptUrl` string, nullable
  - `reference` string, nullable
  - `metadata` object, required: Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.
  - `disputed` boolean, required

## Other responses

- `202`: The payment, still pending
- `400`: Invalid request
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Request conflicts with existing state

---

[API](https://skmtc.dev/zahlo/apis/zahlo-merchant-api.md) - [All operations](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/revisions/8fcbef981e0d?raw)
