---
title: "POST /api/payments/requests/{id}/confirm"
method: POST
path: "/api/payments/requests/{id}/confirm"
tags: ["api", "payment-requests"]
---

# POST /api/payments/requests/{id}/confirm

`POST /api/payments/requests/{id}/confirm`

Confirm a Payment Request

## Path parameters

- `id` string, required — The ID of the payment request

## Request body

- POSTPaymentRequestsConfirmAPaymentRequest
  - `gatewaySecret` string, required — The secret of the payment gateway responsible for the payment
  - `reference` string — A reference to the payment
  - `paymentStatus` 'SUCCEEDED' | 'PENDING' — The status of the payment
  - `paymentMethod` 'visa' | 'mc' | 'sepadirectdebit' | 'amex' | 'sofort' | 'klarna' | 'ideal' | 'giropay' | 'paypal' | 'local' | 'discover' | 'custom' | 'twint' | 'postfinance' | 'blik' | 'p24' | 'affirm' | 'dankort' | 'eps' | 'mobilepay' | 'payconiq' | 'bancontact' | 'payfast' | 'distributor' | 'marketplace' | 'cartebancaire' | 'paymentplan' | 'bizum' | 'afterpay' | 'zip' | 'ach' | 'paybybank' | 'link' | 'alipay' | 'wechatpay' | 'pix' | 'eftpos' | 'revolutpay' | 'wero' | 'scalapay' | 'vipps' | 'cashapppay' | 'crypto' | 'customerbalance' | 'unknown' | 'none' — The payment method used to pay
  - `paymentMethodDetails` object — Payment method details to store as a customer payment method. Only accepted and required for payment requests with origin 'setup'. These details will be stored for future use, and a unique token will be returned that you need to associate with payment method on your side.
    - `identifier` string — Customer-visible label of a payment method, usually last 4 digits of CC number. Do not pass full raw payment credentials. Number sequences longer than 4 characters will be masked.
    - `expirationMonth` integer — Month when the payment method expires, 1-12
    - `expirationYear` integer — Year when the payment method expires, 4 digits
  - `paymentMethodVariant` 'applepay' | 'googlepay' — The payment variant used to pay

## Response `200`

OK

- PaymentRequestResource
  - `_id` string, required — The ID of the payment request
  - `secret` string, required — The secret token of the payment request
  - `amount` number, float — The amount which needs to be paid
  - `currency` 'EUR' | 'USD' | 'GBP' | 'AUD' | 'CHF' | 'THB' | 'ILS' | 'COP' | 'MXN' | 'DKK' | 'NOK' | 'SEK' | 'QAR' | 'CAD' | 'ISK' | 'GTQ' | 'INR' | 'DOP' | 'SGD' | 'PLN' | 'SAR' | 'TTD' | 'ZAR' | 'KYD' | 'HKD' | 'CZK' | 'KRW' | 'JPY' | 'NZD' | 'AED' | 'MAD' | 'TWD' | 'BRL' | 'BWP' | 'NAD' | 'KES' | 'SCR' | 'TRY' | 'SZL' | 'LSL' | 'TZS' | 'UGX' | 'ZMW' | 'ZWG' | 'GHS' | 'NGN' | 'SLE' | 'LRD' | 'XOF' | 'XAF' | 'GEL' | 'IDR' | 'ARS' | 'CRC' | 'HUF' | 'EGP' | 'MYR' | 'VND' | 'PHP' | 'MWK' — An ISO 4217 3-character code of the currency
  - `checkoutId` string — The ID of the checkout that request belongs to
  - `subscriptionId` string — The ID of the subscription that request belongs to
  - `paymentPlanId` string — The ID of the payment plan that request belongs to
  - `paymentGatewayId` string — The ID of the payment gateway responsible for the payment
  - `reference` string
  - `processors` PaymentRequestProcessorResource[]
    - `paymentGatewayType` 'stripe' | 'paypal' | 'adyen' | 'custom' | 'cardconnect' | 'worldline' | 'shift4' | 'authorizenet' | 'wallee' | 'square' | 'payfast' | 'touchnet' | 'transact' | 'unzer' | 'monext' | 'vivenuPayments' | 'ebanx' | 'rapyd' | 'momentusPayments' | 'additional-payment-method', required
    - `paymentGatewayId` string
    - `reference` string
    - `redirectUrl` string
    - `data` union
      - boolean
      - number
      - object
      - string
    - `createdAt` string, date-time, required — An ISO timestamp indicating when the payment request processor was created
  - `status` 'NEW' | 'SUCCEEDED' | 'CANCELED', required
  - `history` object[]
    - `type` 'payment_request.created' | 'payment_request.details_submitted' | 'payment_request.verified' | 'payment_request.confirmed' | 'payment_request.succeeded' | 'payment_request.canceled', required
    - `date` string, date-time, required — An ISO timestamp indicating when the history entry was added
    - `data` union
      - boolean
      - number
      - object
      - string
  - `applications` object[]
    - `amount` number, float, required — The amount of the application
    - `method` 'deposit' | 'customer_balance', required — The method of the application
  - `customer` object
    - `customerId` string — The ID of the customer of the payment request
    - `email` string, email — The email of the user of the payment request
    - `country` string — The country of the user of the payment request
  - `sellerId` string, required
  - `expiresAt` string, date-time — An ISO timestamp indicating when the payment request will expire and a new one will be created if requested
  - `createdAt` string, date-time, required — An ISO timestamp indicating when the payment request was created
  - `updatedAt` string, date-time, required — An ISO Timestamp indicating when the payment request was last updated

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/vivenu/apis/vivenu-api.md) · [All operations](https://skmtc.net/vivenu/apis/vivenu-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vivenu/vivenu-api/revisions/36be0dca14e7/schema)
