---
title: "Create"
method: POST
path: "/paymentMethod/schema"
tags: ["custom-payment-method-schema"]
---

# Create

`POST /paymentMethod/schema`

## Request

- Base URL: `https://api.mercoa.com`
- URL: `https://api.mercoa.com/paymentMethod/schema`
- Auth: HTTP bearer

Create custom payment method schema

## Request body

- PaymentMethodTypesCustomPaymentMethodSchemaRequest
  - `name` string, required
  - `isSource` boolean, required: This payment method can be used as a payment source for an invoice
  - `isDestination` boolean, required: This payment method can be used as a payment destination for an invoice
  - `supportedCurrencies` PaymentMethodTypesCurrencyCode[]: List of currencies that this payment method supports. If not provided, the payment method will support only USD.
  - `fields` PaymentMethodTypesCustomPaymentMethodSchemaField[], required
    - `name` string, required
    - `displayName` string
    - `type` 'text' | 'number' | 'select' | 'date' | 'phone' | 'email' | 'url' | 'dynamicUrl' | 'embeddedUrl' | 'address' | 'usBankRoutingNumber' | 'usBankAccountNumber', required
    - `optional` boolean, required: Indicates whether this field is optional
    - `useAsAccountName` boolean: Indicates whether this field should be used as the name of the payment method. Only one field can be used as the name. Will set the accountName field of the payment method to the value of this field.
    - `useAsAccountNumber` boolean: Indicates whether this field should be used as the account number of the payment method. Only one field can be used as the account number. Will set the accountNumber field of the payment method to the value of this field.
    - `options` string[]: When type is 'select', provide options that can be selected
  - `estimatedProcessingTime` integer: Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
  - `maxAmount` number, double: The maximum amount that can be transferred from this payment method in a single transaction.
  - `minAmount` number, double: The minimum amount that can be transferred from this payment method in a single transaction. Default is 1.

## Response `200`

Response with status 200

- PaymentMethodTypesCustomPaymentMethodSchemaResponse
  - `id` string, required
  - `name` string, required
  - `isSource` boolean, required: This payment method can be used as a payment source for an invoice
  - `isDestination` boolean, required: This payment method can be used as a payment destination for an invoice
  - `supportedCurrencies` PaymentMethodTypesCurrencyCode[], required: List of currencies that this payment method supports.
  - `fields` PaymentMethodTypesCustomPaymentMethodSchemaField[], required
    - `name` string, required
    - `displayName` string
    - `type` 'text' | 'number' | 'select' | 'date' | 'phone' | 'email' | 'url' | 'dynamicUrl' | 'embeddedUrl' | 'address' | 'usBankRoutingNumber' | 'usBankAccountNumber', required
    - `optional` boolean, required: Indicates whether this field is optional
    - `useAsAccountName` boolean: Indicates whether this field should be used as the name of the payment method. Only one field can be used as the name. Will set the accountName field of the payment method to the value of this field.
    - `useAsAccountNumber` boolean: Indicates whether this field should be used as the account number of the payment method. Only one field can be used as the account number. Will set the accountNumber field of the payment method to the value of this field.
    - `options` string[]: When type is 'select', provide options that can be selected
  - `estimatedProcessingTime` integer, required: Estimated time in days for this payment method to process a payments. 0 is an same-day payment methods, -1 is unknown processing time.
  - `maxAmount` number, double: The maximum amount that can be transferred from this payment method in a single transaction.
  - `minAmount` number, double: The minimum amount that can be transferred from this payment method in a single transaction. Default is 1.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Error response with status 400
- `401`: Error response with status 401
- `403`: Error response with status 403
- `404`: Error response with status 404
- `409`: Error response with status 409
- `500`: Error response with status 500
- `501`: Error response with status 501

---

[API](https://skmtc.dev/mercoa/apis/mercoa-2.md) - [All operations](https://skmtc.dev/mercoa/apis/mercoa-2/llms.txt) - [OpenAPI document](https://skmtc.dev/mercoa/apis/mercoa-2/revisions/00a8e403ae18?raw)
