---
title: "Create a payment method"
method: POST
path: "/v1/payment_methods"
tags: ["Payment Methods"]
---

# Create a payment method

`POST /v1/payment_methods`

## Request

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

Creates a payment method. Served by core-api or payments-api depending on the organization's rollout, which may enable payments-api per payment method `type`, in the same response shape either way.

## Request body

- CreatePaymentMethodRequest
  - `data` object
    - `attributes` object
      - `billing` Billing
        - `address` BillingAddress
          - `city` string
          - `country` string
          - `line1` string
          - `line2` string
          - `postal_code` string
          - `state` string
        - `email` string
        - `name` string
        - `phone` string
      - `details` object: Forwarded to the owning method service, never stored here.
      - `expiry_seconds` integer: Seconds the method stays usable, for QR Ph and e-wallet methods; 60 to 9000.
      - `metadata` object: Stored against the method and answered back on every read.
      - `type` string

## Response `200`

OK

- PaymentMethodResponse
  - `data` object
    - `attributes` PaymentMethodAttributes
      - `billing` Billing
        - `address` BillingAddress
          - `city` string
          - `country` string
          - `line1` string
          - `line2` string
          - `postal_code` string
          - `state` string
        - `email` string
        - `name` string
        - `phone` string
      - `created_at` integer
      - `details` object: Relayed from the method service, like NextAction.
      - `expiry_seconds` integer: The one field legacy itself guards on presence.
      - `livemode` boolean
      - `metadata` object
      - `type` 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)
