---
title: "Attach a payment method to a payment intent"
method: POST
path: "/v1/payment_intents/{id}/attach"
tags: ["Payment Intents"]
---

# Attach a payment method to a payment intent

`POST /v1/payment_intents/{id}/attach`

## Request

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

Attaches a payment method, which starts the authorization and returns the payer's `next_action`. Served by core-api or payments-api depending on the organization's rollout, which may enable payments-api per the attached method's type, 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.

## Path parameters

- `id` string, required

## Request body

- AttachPaymentIntentRequest
  - `data` object
    - `attributes` object
      - `client_key` string
      - `payment_method` string
      - `payment_method_options` object: Accepted on either branch; payments-api receives it and ignores it.
      - `return_url` string: Legacy names one url for either outcome; payments-api is given it as both its success and failed redirect.

## 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
- `404`: Not Found
- `409`: Conflict
- `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)
