---
title: "Payment with Adyen"
method: POST
path: "/connectors/adyen/initial-payment"
---

# Payment with Adyen

`POST /connectors/adyen/initial-payment`

Use `/connectors/adyen/initial-payment` endpoint to perform payment with Adyen (that means payment with card with 3D Secure support, Apple Pay or Google Pay).

## Request body

- object
  - `orderId` integer, required — ID of Cleeng order. Order should have `paymentMethodId` that represents Adyen `paymentGateway` and selected `methodName`.
  - `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 (eg. after completing 3D Secure authentication). The URL should include the protocol `http://` or `https://`. For example, `https://your-company.com/checkout/`. You can also include your own additional query parameters, for example, customer ID or order ID. Max: 1024 characters.
  - `customerIP` string — IP address of customer current location. If not given, the IP of the request will be used.
  - `browserInfo` object — **Required for the 3D Secure.** The customer's browser information. The `state.data.browserInfo` object from the Adyen's Dropin `onSubmit` event.
  - `origin` string — **Required for the 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 the 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 on the sandbox environment. It helps to control when 3DSecure should be triggered. Accepted values: `always`, `never`, `preferNo`. Default: `preferNo`
  - `enable3DSRedirectFlow` string — Accepted only on the sandbox environment. Default: `false`. Set to `true` to force 3DS redirect flow.
  - `captchaValue` string — To integrate Google reCAPTCHA go [HERE](https://developers.cleeng.com/docs/fraud-prevention-solution-with-google-recaptcha)

## Response `200`

200

- union
  - object
    - `responseData` object
      - `payment` object
        - `id` integer
        - `orderId` integer
        - `status` string
        - `totalAmount` number
        - `currency` string
        - `customerId` integer
        - `paymentGateway` string
        - `paymentMethod` string
        - `externalPaymentId` string
        - `couponId` unknown
        - `amount` number
        - `country` string
        - `offerType` string
        - `offerId` string
        - `taxValue` number
        - `paymentMethodFee` number
        - `customerServiceFee` integer
        - `rejectedReason` unknown
        - `refundedReason` unknown
        - `paymentDetailsId` integer
        - `paymentOperation` string
        - `gatewaySpecificParams` object
          - `merchantAccount` string
    - `errors` unknown[]
      - unknown
  - 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
- `401` — 401
- `422` — 422
- `429` — 429
- `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/versions/00cbfe7998a4/schema)
