---
title: "Payment with PayPal Express Checkout"
method: POST
path: "/connectors/paypal/v1/tokens"
---

# Payment with PayPal Express Checkout

`POST /connectors/paypal/v1/tokens`

## Request

- Base URL: `https://mediastoreapi-sandbox.cleeng.com`
- URL: `https://mediastoreapi-sandbox.cleeng.com/connectors/paypal/v1/tokens`
- Auth: API key in header `Authorization`

Use `/connectors/paypal/v1/tokens` endpoint to perform payment with Paypal Express Checkout. Payment is executed on PayPal site and after success / error / cancel customer is redirected to predefined routes.

## Request body

- object
  - `orderId` integer, required: ID of Cleeng order (with PayPal paymentMethodId)
  - `successUrl` string, required: URL to redirect the customer to after successful purchase
  - `cancelUrl` string, required: URL to redirect the customer to after cancelled purchase
  - `errorUrl` string, required: URL to redirect the customer to after an error occurs. A query param 'message' will be added to this route
  - `captchaValue` string: To integrate Google reCAPTCHA go [HERE](https://developers.cleeng.com/docs/fraud-prevention-solution-with-google-recaptcha)

## Response `200`

200

- object
  - `responseData` object
    - `redirectUrl` string
  - `errors` unknown[]
    - unknown

## Other responses

- `401`: 401
- `404`: 404
- `422`: 422

---

[API](https://skmtc.dev/cleeng/apis/mediastore-api.md) - [All operations](https://skmtc.dev/cleeng/apis/mediastore-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cleeng/apis/mediastore-api/revisions/b4b65aa4f14c?raw)
