---
title: "Create checkout session V2"
method: POST
path: "/v2/checkout_sessions"
tags: ["Checkout Sessions"]
---

# Create checkout session V2

`POST /v2/checkout_sessions`

## Request

- Base URL: `https://api.paymongo.com`
- URL: `https://api.paymongo.com/v2/checkout_sessions`
- Auth: HTTP basic

Creates a new checkout session without creating a Payment Intent, intended for deferred payment intent flows. Uses the merchant's secret API key for authentication/authorization but does not persist it in checkout-api-go.

Recommended for new integrations: future features are only supported on v2. It currently supports pass-on fees.

## Request body

- CreateCheckoutSessionRequestDTO
  - `data` CreateCheckoutSessionDataRequestDTO
    - `attributes` CreateCheckoutSessionAttributesRequestDTO
      - `billing` BillingDTO
        - `address` AddressDTO
          - `city` string
          - `country` string
          - `line1` string
          - `line2` string
          - `postal_code` string
          - `state` string
        - `email` string
        - `name` string
        - `phone` string
      - `cancel_url` string
      - `capture_type` string: CaptureType controls when the authorized amount is captured: `automatic` (default) or `manual`.
      - `customer_email` string
      - `customer_id` string
      - `description` string
      - `line_items` LineItemDTO[], required: Required fields
        - `amount` integer
        - `currency` string
        - `description` string
        - `images` string[]
        - `name` string
        - `quantity` integer
      - `merchant` string
      - `metadata` object
      - `origin` 'api' | 'instore_qrph' | 'invoices' | 'links' | 'orders' | 'pages' | 'shopify' | 'shopify_v2' | 'storefront' | 'storefront_basic': Identifies the source system or channel that created the checkout session. Internal services use this to attribute and route payments by origin. `storefront_basic` is used by orders-api for basic storefront payments.
      - `pass_on_fees` boolean
      - `payment_method_types` string[], required
      - `reference_number` string
      - `send_email_receipt` boolean
      - `show_description` boolean
      - `show_line_items` boolean
      - `statement_descriptor` string
      - `success_url` string

## Response `200`

Checkout session created successfully

- WrappedCreateCheckoutSessionResponseDTO
  - `data` CreateCheckoutSessionResponseDTO
    - `attributes` CheckoutSessionAttributesResponseDTO
      - `checkout_url` string
      - `created_at` integer
      - `livemode` boolean
      - `updated_at` integer
    - `id` string
    - `type` string
  - `has_more` boolean

## Other responses

- `400`: Invalid request
- `500`: Internal server error

---

[API](https://skmtc.dev/paymongo/apis/checkout.md) - [All operations](https://skmtc.dev/paymongo/apis/checkout/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/checkout/revisions/7cff8bcd246d?raw)
