Custom Payment Method Schema

Update

POST
Update custom payment method schema

Path parameters

schemaIdstringRequired

Request

This endpoint expects an object.
name
stringRequired
isSource
booleanRequired
This payment method can be used as a payment source for an invoice
isDestination
booleanRequired
This payment method can be used as a payment destination for an invoice
fields
list of objectsRequired
supportedCurrencies
list of enumsOptional
List of currencies that this payment method supports. If not provided, the payment method will support only USD.

Response

This endpoint returns 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
1curl -X POST https://api.mercoa.com/paymentMethod/schema/:schemaId \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "string",
6 "isSource": true,
7 "isDestination": true,
8 "fields": [
9 {
10 "name": "string",
11 "type": "text",
12 "optional": true
13 }
14 ]
15}'
200
Successful
1{
2 "id": "string",
3 "name": "string",
4 "isSource": true,
5 "isDestination": true,
6 "supportedCurrencies": [
7 "AED"
8 ],
9 "fields": [
10 {
11 "name": "string",
12 "type": "text",
13 "optional": true,
14 "displayName": "string",
15 "useAsAccountName": true,
16 "useAsAccountNumber": true,
17 "options": [
18 "string"
19 ]
20 }
21 ],
22 "createdAt": "2023-01-01T00:00:00Z",
23 "updatedAt": "2023-01-01T00:00:00Z"
24}