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/cpms_14f78dcd-4614-426e-a37a-7af262431d41 \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Check",
6 "isSource": false,
7 "isDestination": true,
8 "fields": [
9 {
10 "name": "payToTheOrderOf",
11 "type": "text",
12 "optional": false,
13 "displayName": "Pay To The Order Of"
14 },
15 {
16 "name": "accountNumber",
17 "type": "number",
18 "optional": false,
19 "displayName": "Account Number",
20 "useAsAccountNumber": true
21 },
22 {
23 "name": "routingNumber",
24 "type": "number",
25 "optional": false,
26 "displayName": "Routing Number"
27 },
28 {
29 "name": "address",
30 "type": "address",
31 "optional": false,
32 "displayName": "Address"
33 }
34 ],
35 "supportedCurrencies": [
36 "USD"
37 ]
38}'
200Successful
1{
2 "id": "cpms_14f78dcd-4614-426e-a37a-7af262431d41",
3 "name": "Check",
4 "isSource": false,
5 "isDestination": true,
6 "supportedCurrencies": [
7 "USD"
8 ],
9 "fields": [
10 {
11 "name": "payToTheOrderOf",
12 "type": "text",
13 "optional": false,
14 "displayName": "Pay To The Order Of"
15 },
16 {
17 "name": "accountNumber",
18 "type": "number",
19 "optional": false,
20 "displayName": "Account Number",
21 "useAsAccountNumber": true
22 },
23 {
24 "name": "routingNumber",
25 "type": "number",
26 "optional": false,
27 "displayName": "Routing Number"
28 },
29 {
30 "name": "address",
31 "type": "address",
32 "optional": false,
33 "displayName": "Address"
34 }
35 ],
36 "createdAt": "2021-01-01T00:00:00Z",
37 "updatedAt": "2021-01-01T00:00:00Z"
38}