---
title: "Add Adyen payment details"
method: POST
path: "/connectors/adyen/payment-details"
---

# Add Adyen payment details

`POST /connectors/adyen/payment-details`

Use this method to add Adyen payment details (for example a card with 3D Secure support, Apple Pay or Google Pay), so that new payment details can be used for recurring payments.
Example use case:  a customer updates a card or wants to switch payment method to a card.

Adding payment details may not be finished after calling this endpoint. If payment details were successfully added to Cleeng, you will receive the `paymentDetails` object. If there is an additional action needed, you will receive an `action` object.

## Request body

- object
  - `paymentMethodId` integer, required — ID of publisher payment method with: Adyen `paymentGateway`, and `methodName` that customer selected.
  - `paymentMethod` object, required — The `state.data.paymentMethod` object from the Adyen's Drop-in `onSubmit` event.
    - `type` string, required — Required for all payment methods. Value `scheme` - for card payment method.
    - `encryptedCardNumber` string — Encrypted number of a card. Required for a card.
    - `encryptedExpiryMonth` string — Encrypted card expiry month. Required for a card.
    - `encryptedExpiryYear` string — Encrypted card expiry year. Required for a card.
    - `encryptedSecurityCode` string — Encrypted card security code. Required for a card.
    - `holderName` string — Card holder’s name. Required for a card.
  - `returnUrl` string, required — The URL to return to in case of a redirection.
  - `customerIP` string — IP address of customer current location. If not given, the IP of the request will be used. Please note this IP address is also used to prevent fraud. (Make sure you send the end-user IP, and not that of any possible middleware).
  - `browserInfo` object — **Required for 3D Secure.** The customer browser information. The `state.data.browserInfo` object from the Adyen's Drop-in `onSubmit` event.
  - `origin` string — **Required for 3D Secure.** Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from.
  - `billingAddress` object — Recommended for 3D Secure.
    - `street` string — The name of the street. Maximum length: 3000 characters.
    - `houseNumberOrName` string — The number or name of the house. Maximum length: 3000 characters.
    - `postalCode` string — A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
    - `city` string — The name of the city. Maximum length: 3000 characters.
    - `country` string — The two-character ISO-3166-1 alpha-2 country code. For example, US.
    - `stateOrProvince` string — The two-character ISO 3166-2 state or province code. For example, CA in the US or ON in Canada.
  - `attemptAuthentication` string — Accepted only in the sandbox environment. It helps to control when 3DSecure should be triggered. Accepted values: `always`, `never`, `preferNo`. Default: `preferNo`
  - `enable3DSRedirectFlow` boolean — Accepted only in the sandbox environment. Default: `false`. Set to `true` to force 3DS redirect flow.

## Response `200`

200

- object
  - `responseData` object
    - `action` object
      - `paymentMethodType` string
      - `url` string
      - `data` object
        - `MD` string
        - `PaReq` string
        - `TermUrl` string
      - `method` string
      - `type` string
  - `errors` unknown[]
    - unknown

## Other responses

- `400` — 400
- `500` — 500

---

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