---
title: "Create payment"
method: POST
path: "/payments"
tags: ["Payments"]
---

# Create payment

`POST /payments`

Use when recording a payment against an invoice (e.g. after receiving funds via a gateway or manual entry).

## Request body

- CreatePaymentRequest
  - `amount` string, required
  - `cancel_url` string
  - `currency` string, required
  - `destination_id` string, required
  - `destination_type` 'INVOICE' | 'CUSTOMER', required
  - `idempotency_key` string
  - `metadata` TypesMetadata
  - `payment_gateway` 'stripe' | 'razorpay' | 'nomod' | 'moyasar' | 'paddle' | 'whop'
  - `payment_method_id` string
  - `payment_method_type` 'CARD' | 'ACH' | 'OFFLINE' | 'CREDITS' | 'PAYMENT_LINK' | 'UPI', required
  - `process_payment` boolean
  - `save_card_and_make_default` boolean
  - `success_url` string

## Response `201`

Created payment

- PaymentResponse
  - `amount` string
  - `attempts` PaymentAttemptResponse[]
    - `attempt_number` integer
    - `created_at` string, date-time
    - `created_by` string
    - `error_message` string
    - `id` string
    - `metadata` TypesMetadata
    - `payment_id` string
    - `tenant_id` string
    - `updated_at` string, date-time
    - `updated_by` string
  - `created_at` string, date-time
  - `created_by` string
  - `currency` string
  - `destination_id` string
  - `destination_type` 'INVOICE' | 'CUSTOMER'
  - `error_message` string
  - `failed_at` string, date-time
  - `gateway_metadata` TypesMetadata
  - `gateway_payment_id` string
  - `gateway_tracking_id` string
  - `id` string
  - `idempotency_key` string
  - `invoice_number` string
  - `metadata` TypesMetadata
  - `payment_gateway` string
  - `payment_method_id` string
  - `payment_method_type` 'CARD' | 'ACH' | 'OFFLINE' | 'CREDITS' | 'PAYMENT_LINK' | 'UPI'
  - `payment_status` 'INITIATED' | 'PENDING' | 'PROCESSING' | 'SUCCEEDED' | 'OVERPAID' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'VOIDED'
  - `payment_url` string
  - `refunded_at` string, date-time
  - `save_card_and_make_default` boolean
  - `succeeded_at` string, date-time
  - `tenant_id` string
  - `track_attempts` boolean
  - `updated_at` string, date-time
  - `updated_by` string
  - `voided_at` string, date-time

## Other responses

- `400` — Invalid request
- `500` — Server error

## Changes

- **2026-07-15** `f8ecf435d25d` — 3 warning, 1 info
  - added the new `UPI` enum value to the `payment_method_type` response property for the response status `201`
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
  - added the new `UPI` enum value to the request property `payment_method_type`
- **2026-07-09** `7d57386313c7` — 13 breaking, 16 warning, 13 info
  - request property `destination_type` was restricted to a list of enum values
  - request property `payment_gateway` was restricted to a list of enum values
  - request property `payment_method_type` was restricted to a list of enum values
  - the `destination_type` request property type changed from no type to `string`
  - …38 more
- **2026-07-09** `4b1a811c4179` — 31 breaking, 16 info
  - removed the enum value `ACH` of the request property `payment_method_type`
  - removed the enum value `CARD` of the request property `payment_method_type`
  - removed the enum value `CREDITS` of the request property `payment_method_type`
  - removed the enum value `CUSTOMER` of the request property `destination_type`
  - …43 more
- …earlier changes not shown

[Full history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/payments/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/f8ecf435d25d/schema)
