---
title: "Confirm payment session"
method: POST
path: "/api/sites/multiscreen/{site_name}/ecommerce/payment-sessions/{id}/confirm"
tags: ["Payment Gateways Runtime"]
---

# Confirm payment session

`POST /api/sites/multiscreen/{site_name}/ecommerce/payment-sessions/{id}/confirm`

## Request

- Base URL: `https://api.duda.co`
- URL: `https://api.duda.co/api/sites/multiscreen/{site_name}/ecommerce/payment-sessions/{id}/confirm`
- Auth: HTTP basic

Reports the resulting state of the payment session with the given id, along with the gateway's transaction id, a display name and icon for the payment method used, confirmation instructions, refund links, and an error message for a failed state. Returns the URL to redirect the customer to.

## Path parameters

- `site_name` string, required
- `id` string, required

## Request body

- UpdatePaymentSessionInputDto
  - `state` 'PROCESSED' | 'FAILED' | 'PENDING', required
  - `transaction_id` string, nullable: System identifier of the transaction given by the payment gateway
  - `icon` string, nullable: Icon URL to display in the confirmation checkout
  - `name` string, nullable: Display name of the method used for the transaction
  - `instructions` string, nullable: Display instructions to the customers when they will return to the confirmation page. HTML is sanitized server-side.
  - `links` PaymentSessionLinks
    - `refunds` string, nullable: URL that our servers will POST to when a refund is issued from the merchant dashboard
  - `error` PaymentSessionError
    - `code` string, required: System readable code of the error
    - `message` string, required: Message to display to the customer

## Response `200`

OK

- UpdatePaymentSessionOutputDto
  - `return_url` string: URL to redirect the customer to

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Content
- `429`: Too many requests. The rate limit was exceeded.

---

[API](https://skmtc.dev/duda/apis/duda-partner-api.md) - [All operations](https://skmtc.dev/duda/apis/duda-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/duda/apis/duda-partner-api/revisions/52be4d41cb12?raw)
