Custom Payment Method Schema

Create

POST
Create custom payment method schema

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 \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Wire",
6 "isSource": false,
7 "isDestination": true,
8 "fields": [
9 {
10 "name": "bankName",
11 "type": "text",
12 "optional": false,
13 "displayName": "Bank Name"
14 },
15 {
16 "name": "recipientName",
17 "type": "text",
18 "optional": false,
19 "displayName": "Recipient Name"
20 },
21 {
22 "name": "accountNumber",
23 "type": "number",
24 "optional": false,
25 "displayName": "Account Number",
26 "useAsAccountNumber": true
27 },
28 {
29 "name": "routingNumber",
30 "type": "number",
31 "optional": false,
32 "displayName": "Routing Number"
33 }
34 ],
35 "supportedCurrencies": [
36 "USD",
37 "EUR"
38 ]
39}'
200Successful
1{
2 "id": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769",
3 "name": "Wire",
4 "isSource": false,
5 "isDestination": true,
6 "supportedCurrencies": [
7 "USD",
8 "EUR"
9 ],
10 "fields": [
11 {
12 "name": "bankName",
13 "type": "text",
14 "optional": false,
15 "displayName": "Bank Name"
16 },
17 {
18 "name": "recipientName",
19 "type": "text",
20 "optional": false,
21 "displayName": "Recipient Name"
22 },
23 {
24 "name": "accountNumber",
25 "type": "number",
26 "optional": false,
27 "displayName": "Account Number",
28 "useAsAccountNumber": true
29 },
30 {
31 "name": "routingNumber",
32 "type": "number",
33 "optional": false,
34 "displayName": "Routing Number"
35 }
36 ],
37 "createdAt": "2021-01-01T00:00:00Z",
38 "updatedAt": "2021-01-01T00:00:00Z"
39}