Custom Payment Method Schema

Create

POST
https://api.mercoa.com/paymentMethod/schema

Create custom payment method schema

Request

This endpoint expects an object.
name
string
isSource
boolean

This payment method can be used as a payment source for an invoice

isDestination
boolean

This payment method can be used as a payment destination for an invoice

fields
list of objects
supportedCurrencies
optional list of enums

List of currencies that this payment method supports. If not provided, the payment method will support only USD.

Response

This endpoint return an object.
id
string
name
string
isSource
boolean

This payment method can be used as a payment source for an invoice

isDestination
boolean

This payment method can be used as a payment destination for an invoice

supportedCurrencies
list of enums

List of currencies that this payment method supports.

fields
list of objects
createdAt
datetime
updatedAt
datetime
POST
/paymentMethod/schema
curl -X POST https://api.mercoa.com/paymentMethod/schema \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"isSource": true,
"isDestination": true,
"fields": [
{
"name": "string",
"type": "text",
"optional": true
}
]
}'
Response
{
"id": "string",
"name": "string",
"isSource": true,
"isDestination": true,
"supportedCurrencies": [
"AED"
],
"fields": [
{
"name": "string",
"type": "text",
"optional": true,
"displayName": "string",
"useAsAccountName": true,
"useAsAccountNumber": true,
"options": [
"string"
]
}
],
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-01T00:00:00Z"
}