---
title: "Create a payment intent"
method: POST
path: "/v1/payment_intents"
tags: ["Payment Intents"]
---

# Create a payment intent

`POST /v1/payment_intents`

## Request

- Base URL: `https://orders-api.paymongo.com`
- URL: `https://orders-api.paymongo.com/v1/payment_intents`
- Auth: HTTP basic

Creates a payment intent. Served by core-api or payments-api depending on the organization's rollout, in the same response shape either way. A request carrying `payment_method_options` is served by either; payments-api accepts the field without acting on it. A request using `setup_future_usage` is served by either: its `customer_id` is validated against customer-api and answers `not_found` when no such customer exists. An `off_session` one, a subscription's carrier, is served by core-api until setup intents are served from payments-api, so the carrier and its setup intent live on one service.

## Request body

- CreatePaymentIntentRequest
  - `data` object
    - `attributes` object
      - `amount` integer
      - `capture_type` string
      - `currency` string
      - `description` string
      - `metadata` object
      - `origin` string: Honoured only for the platform's own services, judged by client address; a merchant's value is dropped and the intent defaults to `api`.
      - `payment_method_allowed` string[]
      - `payment_method_options` object: Accepted on either branch; payments-api receives it and ignores it.
      - `setup_future_usage` object: Honoured on either branch; payments-api carries the session type and the customer id in the intent's metadata.
      - `statement_descriptor` string

## Response `200`

OK

- PaymentIntentResponse
  - `data` object
    - `attributes` PaymentIntentAttributes
      - `amount` integer
      - `capture_type` string
      - `client_key` string
      - `created_at` integer
      - `currency` string
      - `description` string
      - `last_payment_error` unknown
      - `livemode` boolean
      - `metadata` object
      - `next_action` object: Relayed from the method service as received; its shape is theirs.
      - `original_amount` integer
      - `payment_method_allowed` string[]: Never null: legacy builds both with .map.
      - `payment_method_options` unknown
      - `payments` unknown[]
        - unknown
      - `setup_future_usage` unknown
      - `statement_descriptor` string
      - `status` string
      - `updated_at` integer
    - `id` string
    - `type` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `default`

---

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