> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/payment-method/create/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Create POST https://api.mercoa.com/entity/{entityId}/paymentMethod Content-Type: application/json Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/payment-method/create ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `entityId` (string, required) — Entity ID or Entity ForeignID ### Body (application/json) This endpoint expects an object. - `object` - `type`: `bankAccount` - `accountNumber` (string, required) - `accountType` (enum, required) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `routingNumber` (string, required) - `accountName` (string, optional) — The name of the account. For example "My Checking Account" or "Property XYZ Checking" - `checkOptions` (object, optional) — If this bank account supports check printing, use this to enable check printing and set the check options. Checks will be printed directly from the bank account. - `signatoryName` (string, required) — Name of the person who's signature will be printed on the check. - `enabled` (boolean, optional) — If true, will allow the user to print checks from this bank account - `initialCheckNumber` (integer, optional) — If provided, will start the check number sequence at the provided number. If not provided, will start at 5000. - `routingNumberOverride` (string, optional) — If provided, will print a check with the provided routing number instead of the one from the bank account - `accountNumberOverride` (string, optional) — If provided, will print a check with the provided account number instead of the one from the bank account - `accountHolderNameOverride` (string, optional) — If provided, will print a check with the provided account holder name instead of the payer name from the invoice - `accountHolderAddressOverride` (object, optional) — If provided, will print a check with the provided account holder address instead of the payer address from the invoice - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `signatureImage` (string, optional) — Base64 encoded image of the signature. If not provided, will use the signatoryName to generate a signature. Mercoa will automatically grayscale, resize, and convert the image to a PNG the image to fit on the check. - `useSignatureImage` (boolean, optional) — If true, will print checks with the provided signatureImage. If false, will print checks with a generated signature from the signatoryName. If this parameter is not set the default behavior is to use the signatureImage if provided. - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `plaid` (object or object or object, optional) — If provided, will link a bank account using Plaid Link - Plaid Processor Token Request - `processorToken` (string, required) — Plaid processor token for the account. If you already have a processor token for the account (for example, you have linked the account to your app already), use this instead of publicToken. - Plaid Public Token Request - `publicToken` (string, required) — Public token received from Plaid Link. Use this if linking the account using the Plaid Link frontend component. - `accountId` (string, optional) — Plaid account ID. If not provided, will try to match the provided routing number and account number. - Plaid Access Token Request - `accessToken` (string, required) — Plaid access token for the account. If you already have an access token for the account (for example, you have linked the account to your app already), use this instead of publicToken. - `accountId` (string, optional) — Plaid account ID. If not provided, will try to match the provided routing number and account number. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `bankName` (string, optional, deprecated) — The name of the bank. This is now automatically set when the bank account is linked. - `type`: `card` - `cardBrand` (enum, required) - Allowed values: `AmericanExpress`, `Discover`, `Mastercard`, `Visa` - `cardType` (enum, required) - Allowed values: `credit`, `debit`, `prepaid`, `unknown` - `expMonth` (string, required) - `expYear` (string, required) - `lastFour` (string, required) - `token` (string, required) - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `check` - `addressLine1` (string, required) - `city` (string, required) - `country` (string, required) - `payToTheOrderOf` (string, required) - `postalCode` (string, required) - `stateOrProvince` (string, required) - `addressLine2` (string, optional) - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `custom` - `data` (map from string to string, required) — Object of key/value pairs that matches the keys in the linked payment method schema. - `schemaId` (string, required) — Payment method schema used for this payment method. Defines the fields that this payment method contains. - `accountName` (string, optional) - `accountNumber` (string, optional) - `availableBalance` (double, optional) — The available balance for this payment method. - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `foreignId` (string, optional) — ID for this payment method in your system - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `offPlatform` - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `utility` - `utilityId` (string, required) — The ID of the utility that this payment method is linked to. - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `wallet` - `defaultDestination` (boolean, optional) — If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset. - `defaultSource` (boolean, optional) — If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `frozen` (boolean, optional) — If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `metadata` (map from string to string, optional) — Metadata associated with this payment method. - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. ## Response ### 200 - `object` - `type`: `bankAccount` - `accountName` (string, required) - `accountNumber` (string, required) - `accountType` (enum, required) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `bankName` (string, required) - `createdAt` (datetime, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `routingNumber` (string, required) - `status` (enum, required) - Allowed values: `NEW`, `VERIFIED`, `VERIFICATION_FAILED`, `PENDING`, `ERRORED` - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `checkOptions` (object, optional) — If check printing is enabled for the account, will return the check options for this bank account - `signatoryName` (string, required) — Name of the person who's signature will be printed on the check. - `enabled` (boolean, optional) — If true, will allow the user to print checks from this bank account - `initialCheckNumber` (integer, optional) — If provided, will start the check number sequence at the provided number. If not provided, will start at 5000. - `routingNumberOverride` (string, optional) — If provided, will print a check with the provided routing number instead of the one from the bank account - `accountNumberOverride` (string, optional) — If provided, will print a check with the provided account number instead of the one from the bank account - `accountHolderNameOverride` (string, optional) — If provided, will print a check with the provided account holder name instead of the payer name from the invoice - `accountHolderAddressOverride` (object, optional) — If provided, will print a check with the provided account holder address instead of the payer address from the invoice - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `signatureImage` (string, optional) — Base64 encoded image of the signature. If not provided, will use the signatoryName to generate a signature. Mercoa will automatically grayscale, resize, and convert the image to a PNG the image to fit on the check. - `useSignatureImage` (boolean, optional) — If true, will print checks with the provided signatureImage. If false, will print checks with a generated signature from the signatoryName. If this parameter is not set the default behavior is to use the signatureImage if provided. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `card` - `cardBrand` (enum, required) - Allowed values: `AmericanExpress`, `Discover`, `Mastercard`, `Visa` - `cardType` (enum, required) - Allowed values: `credit`, `debit`, `prepaid`, `unknown` - `createdAt` (datetime, required) - `expMonth` (string, required) - `expYear` (string, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `lastFour` (string, required) - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `check` - `addressLine1` (string, required) - `city` (string, required) - `country` (string, required) - `createdAt` (datetime, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `payToTheOrderOf` (string, required) - `postalCode` (string, required) - `stateOrProvince` (string, required) - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `addressLine2` (string, optional) - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `custom` - `createdAt` (datetime, required) - `data` (map from string to string, required) — Object of key/value pairs that matches the keys in the linked payment method schema. - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `schema` (object, required) - `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` (list of enum, required) — List of currencies that this payment method supports. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `fields` (list of object, required) - `name` (string, required) - `type` (enum, required) - Allowed values: `text`, `number`, `select`, `date`, `phone`, `email`, `url`, `dynamicUrl`, `embeddedUrl`, `address`, `usBankRoutingNumber`, `usBankAccountNumber` - `optional` (boolean, required) — Indicates whether this field is optional - `displayName` (string, optional) - `useAsAccountName` (boolean, optional) — 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, optional) — 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` (list of string, optional) — 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. - `createdAt` (datetime, required) - `updatedAt` (datetime, required) - `maxAmount` (double, optional) — The maximum amount that can be transferred from this payment method in a single transaction. - `minAmount` (double, optional) — The minimum amount that can be transferred from this payment method in a single transaction. Default is 1. - `schemaId` (string, required) — Payment method schema used for this payment method. Defines the fields that this payment method contains. - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `accountName` (string, optional) - `accountNumber` (string, optional) - `availableBalance` (double, optional) — The available balance for this payment method. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `foreignId` (string, optional) — ID for this payment method in your system - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `offPlatform` - `createdAt` (datetime, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `utility` - `createdAt` (datetime, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `utilityId` (string, required) — The ID of the utility that this payment method is linked to. - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. - `type`: `wallet` - `availableBalance` (object, required) — The balance available for use in this wallet. - `amount` (double, required) — The amount in major units of the currency. - `currency` (enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `createdAt` (datetime, required) - `frozen` (boolean, required) — Frozen payment methods cannot be used for payments, but will still be returned in API responses. - `id` (string, required) - `isDefaultDestination` (boolean, required) — Indicates whether this payment method is the default destination for the entity - `isDefaultSource` (boolean, required) — Indicates whether this payment method is the default source for the entity - `metadata` (map from string to string, required) — Metadata associated with this payment method. - `pendingBalance` (object, required) — The in-flight balance into/out of this wallet. - `amount` (double, required) — The amount in major units of the currency. - `currency` (enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `supportedCurrencies` (list of enum, required) - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL` - `updatedAt` (datetime, required) - `externalAccountingSystemId` (string, optional) — ID for this payment method in the external accounting system (e.g Rutter or Codat) - `confirmedByEntity` (boolean, optional) — (ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct. ## Errors ### 400 Bad Request - `errorName` ("BadRequest", required) - `content` (string, required) ### 401 Unauthorized - `errorName` ("Unauthorized", required) - `content` (string, required) ### 403 Forbidden - `errorName` ("Forbidden", required) - `content` (string, required) ### 404 Not Found - `errorName` ("NotFound", required) - `content` (string, required) ### 409 Conflict - `errorName` ("Conflict", required) - `content` (string, required) ### 500 Internal Server Error - `errorName` ("InternalServerError", required) - `content` (string, required) ### 501 Unimplemented - `errorName` ("Unimplemented", required) - `content` (string, required) ## Examples ### BankAccount **Request** ```json { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678" } ``` **Response** ```json { "type": "bankAccount", "accountName": "My Checking Account", "accountNumber": "99988767623", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "12345678", "status": "VERIFIED", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": true } ``` **SDK Code** ```python BankAccount import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccount import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "bankAccount", routingNumber: "12345678", accountNumber: "99988767623", accountType: "CHECKING" }); ``` ```go BankAccount package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccount require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\"\n}" response = http.request(request) puts response.read_body ``` ```java BankAccount import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\"\n}") .asString(); ``` ```php BankAccount request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccount using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccount import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### BankAccountCheckEnabled **Request** ```json { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "checkOptions": { "signatoryName": "John Doe", "enabled": true, "initialCheckNumber": 5000 } } ``` **Response** ```json { "type": "bankAccount", "accountName": "My Checking Account", "accountNumber": "99988767623", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "12345678", "status": "VERIFIED", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "checkOptions": { "signatoryName": "John Doe", "enabled": true, "initialCheckNumber": 5000 }, "confirmedByEntity": true } ``` **SDK Code** ```python BankAccountCheckEnabled import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "checkOptions": { "signatoryName": "John Doe", "enabled": True, "initialCheckNumber": 5000 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccountCheckEnabled import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "bankAccount", routingNumber: "12345678", accountNumber: "99988767623", accountType: "CHECKING", checkOptions: { enabled: true, initialCheckNumber: 5000, signatoryName: "John Doe" } }); ``` ```go BankAccountCheckEnabled package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"checkOptions\": {\n \"signatoryName\": \"John Doe\",\n \"enabled\": true,\n \"initialCheckNumber\": 5000\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccountCheckEnabled require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"checkOptions\": {\n \"signatoryName\": \"John Doe\",\n \"enabled\": true,\n \"initialCheckNumber\": 5000\n }\n}" response = http.request(request) puts response.read_body ``` ```java BankAccountCheckEnabled import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"checkOptions\": {\n \"signatoryName\": \"John Doe\",\n \"enabled\": true,\n \"initialCheckNumber\": 5000\n }\n}") .asString(); ``` ```php BankAccountCheckEnabled request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "checkOptions": { "signatoryName": "John Doe", "enabled": true, "initialCheckNumber": 5000 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccountCheckEnabled using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"checkOptions\": {\n \"signatoryName\": \"John Doe\",\n \"enabled\": true,\n \"initialCheckNumber\": 5000\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccountCheckEnabled import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "checkOptions": [ "signatoryName": "John Doe", "enabled": true, "initialCheckNumber": 5000 ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### BankAccountVendor **Request** ```json { "type": "bankAccount", "accountNumber": "55934059697648", "accountType": "CHECKING", "routingNumber": "66554433" } ``` **Response** ```json { "type": "bankAccount", "accountName": "Vendor Checking Account", "accountNumber": "55934059697648", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_7610541f-4619-4033-8620-cfccfb811293", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "66554433", "status": "NEW", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": false } ``` **SDK Code** ```python BankAccountVendor import requests url = "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "55934059697648", "accountType": "CHECKING", "routingNumber": "66554433" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccountVendor import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", { type: "bankAccount", routingNumber: "66554433", accountNumber: "55934059697648", accountType: "CHECKING" }); ``` ```go BankAccountVendor package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"55934059697648\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"66554433\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccountVendor require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"55934059697648\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"66554433\"\n}" response = http.request(request) puts response.read_body ``` ```java BankAccountVendor import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"55934059697648\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"66554433\"\n}") .asString(); ``` ```php BankAccountVendor request('POST', 'https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "55934059697648", "accountType": "CHECKING", "routingNumber": "66554433" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccountVendor using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"55934059697648\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"66554433\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccountVendor import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "55934059697648", "accountType": "CHECKING", "routingNumber": "66554433" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Check **Request** ```json { "type": "check", "addressLine1": "123 Main St", "city": "New York", "country": "US", "payToTheOrderOf": "John Doe", "postalCode": "10001", "stateOrProvince": "NY", "addressLine2": "Apt 1" } ``` **Response** ```json { "type": "check", "addressLine1": "123 Main St", "city": "New York", "country": "US", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18", "isDefaultDestination": true, "isDefaultSource": false, "metadata": {}, "payToTheOrderOf": "John Doe", "postalCode": "10001", "stateOrProvince": "NY", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "addressLine2": "Apt 1", "confirmedByEntity": true } ``` **SDK Code** ```python Check import requests url = "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload = { "type": "check", "addressLine1": "123 Main St", "city": "New York", "country": "US", "payToTheOrderOf": "John Doe", "postalCode": "10001", "stateOrProvince": "NY", "addressLine2": "Apt 1" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript Check import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", { type: "check", payToTheOrderOf: "John Doe", addressLine1: "123 Main St", addressLine2: "Apt 1", city: "New York", stateOrProvince: "NY", postalCode: "10001", country: "US" }); ``` ```go Check package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload := strings.NewReader("{\n \"type\": \"check\",\n \"addressLine1\": \"123 Main St\",\n \"city\": \"New York\",\n \"country\": \"US\",\n \"payToTheOrderOf\": \"John Doe\",\n \"postalCode\": \"10001\",\n \"stateOrProvince\": \"NY\",\n \"addressLine2\": \"Apt 1\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Check require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"check\",\n \"addressLine1\": \"123 Main St\",\n \"city\": \"New York\",\n \"country\": \"US\",\n \"payToTheOrderOf\": \"John Doe\",\n \"postalCode\": \"10001\",\n \"stateOrProvince\": \"NY\",\n \"addressLine2\": \"Apt 1\"\n}" response = http.request(request) puts response.read_body ``` ```java Check import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"check\",\n \"addressLine1\": \"123 Main St\",\n \"city\": \"New York\",\n \"country\": \"US\",\n \"payToTheOrderOf\": \"John Doe\",\n \"postalCode\": \"10001\",\n \"stateOrProvince\": \"NY\",\n \"addressLine2\": \"Apt 1\"\n}") .asString(); ``` ```php Check request('POST', 'https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod', [ 'body' => '{ "type": "check", "addressLine1": "123 Main St", "city": "New York", "country": "US", "payToTheOrderOf": "John Doe", "postalCode": "10001", "stateOrProvince": "NY", "addressLine2": "Apt 1" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Check using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"check\",\n \"addressLine1\": \"123 Main St\",\n \"city\": \"New York\",\n \"country\": \"US\",\n \"payToTheOrderOf\": \"John Doe\",\n \"postalCode\": \"10001\",\n \"stateOrProvince\": \"NY\",\n \"addressLine2\": \"Apt 1\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Check import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "check", "addressLine1": "123 Main St", "city": "New York", "country": "US", "payToTheOrderOf": "John Doe", "postalCode": "10001", "stateOrProvince": "NY", "addressLine2": "Apt 1" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### CustomWire **Request** ```json { "type": "custom", "data": { "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" }, "schemaId": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "accountName": "Vendor Wire Account", "accountNumber": "123456789", "foreignId": "DB_FOREIGN_ID" } ``` **Response** ```json { "type": "custom", "createdAt": "2021-01-01T00:00:00Z", "data": { "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" }, "frozen": false, "id": "pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18", "isDefaultDestination": false, "isDefaultSource": false, "metadata": {}, "schema": { "id": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "name": "Wire", "isSource": false, "isDestination": true, "supportedCurrencies": [ "USD", "EUR" ], "fields": [ { "name": "bankName", "type": "text", "optional": false, "displayName": "Bank Name" }, { "name": "recipientName", "type": "text", "optional": false, "displayName": "Recipient Name" }, { "name": "accountNumber", "type": "usBankAccountNumber", "optional": false, "displayName": "Account Number", "useAsAccountNumber": true }, { "name": "routingNumber", "type": "usBankRoutingNumber", "optional": false, "displayName": "Routing Number" } ], "estimatedProcessingTime": 0, "createdAt": "2021-01-01T00:00:00Z", "updatedAt": "2021-01-01T00:00:00Z" }, "schemaId": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "accountName": "Vendor Wire Account", "accountNumber": "123456789", "foreignId": "DB_FOREIGN_ID", "confirmedByEntity": true } ``` **SDK Code** ```python CustomWire import requests url = "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload = { "type": "custom", "data": { "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" }, "schemaId": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "accountName": "Vendor Wire Account", "accountNumber": "123456789", "foreignId": "DB_FOREIGN_ID" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript CustomWire import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", { type: "custom", foreignId: "DB_FOREIGN_ID", accountName: "Vendor Wire Account", accountNumber: "123456789", schemaId: "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", data: { "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" } }); ``` ```go CustomWire package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod" payload := strings.NewReader("{\n \"type\": \"custom\",\n \"data\": {\n \"bankName\": \"Chase\",\n \"recipientName\": \"John Doe\",\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"99988767623\"\n },\n \"schemaId\": \"cpms_4794d597-70dc-4fec-b6ec-c5988e759769\",\n \"accountName\": \"Vendor Wire Account\",\n \"accountNumber\": \"123456789\",\n \"foreignId\": \"DB_FOREIGN_ID\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby CustomWire require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"custom\",\n \"data\": {\n \"bankName\": \"Chase\",\n \"recipientName\": \"John Doe\",\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"99988767623\"\n },\n \"schemaId\": \"cpms_4794d597-70dc-4fec-b6ec-c5988e759769\",\n \"accountName\": \"Vendor Wire Account\",\n \"accountNumber\": \"123456789\",\n \"foreignId\": \"DB_FOREIGN_ID\"\n}" response = http.request(request) puts response.read_body ``` ```java CustomWire import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"custom\",\n \"data\": {\n \"bankName\": \"Chase\",\n \"recipientName\": \"John Doe\",\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"99988767623\"\n },\n \"schemaId\": \"cpms_4794d597-70dc-4fec-b6ec-c5988e759769\",\n \"accountName\": \"Vendor Wire Account\",\n \"accountNumber\": \"123456789\",\n \"foreignId\": \"DB_FOREIGN_ID\"\n}") .asString(); ``` ```php CustomWire request('POST', 'https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod', [ 'body' => '{ "type": "custom", "data": { "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" }, "schemaId": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "accountName": "Vendor Wire Account", "accountNumber": "123456789", "foreignId": "DB_FOREIGN_ID" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp CustomWire using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"custom\",\n \"data\": {\n \"bankName\": \"Chase\",\n \"recipientName\": \"John Doe\",\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"99988767623\"\n },\n \"schemaId\": \"cpms_4794d597-70dc-4fec-b6ec-c5988e759769\",\n \"accountName\": \"Vendor Wire Account\",\n \"accountNumber\": \"123456789\",\n \"foreignId\": \"DB_FOREIGN_ID\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift CustomWire import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "custom", "data": [ "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623" ], "schemaId": "cpms_4794d597-70dc-4fec-b6ec-c5988e759769", "accountName": "Vendor Wire Account", "accountNumber": "123456789", "foreignId": "DB_FOREIGN_ID" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### BankAccountPlaidPublicToken **Request** ```json { "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "publicToken": "public-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } ``` **Response** ```json { "type": "bankAccount", "accountName": "My Checking Account", "accountNumber": "99988767623", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "12345678", "status": "VERIFIED", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": true } ``` **SDK Code** ```python BankAccountPlaidPublicToken import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "publicToken": "public-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccountPlaidPublicToken import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "bankAccount", routingNumber: "", accountNumber: "7623", accountType: "CHECKING", plaid: { publicToken: "public-sandbox-af1a0311-da53-4636-b754-dd15cc058176", accountId: "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }); ``` ```go BankAccountPlaidPublicToken package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"publicToken\": \"public-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccountPlaidPublicToken require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"publicToken\": \"public-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java BankAccountPlaidPublicToken import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"publicToken\": \"public-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") .asString(); ``` ```php BankAccountPlaidPublicToken request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "publicToken": "public-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccountPlaidPublicToken using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"publicToken\": \"public-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccountPlaidPublicToken import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": [ "publicToken": "public-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### BankAccountPlaidProcessorToken **Request** ```json { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "plaid": { "processorToken": "processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } ``` **Response** ```json { "type": "bankAccount", "accountName": "My Checking Account", "accountNumber": "99988767623", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "12345678", "status": "VERIFIED", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": true } ``` **SDK Code** ```python BankAccountPlaidProcessorToken import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "plaid": { "processorToken": "processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccountPlaidProcessorToken import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "bankAccount", routingNumber: "12345678", accountNumber: "99988767623", accountType: "CHECKING", plaid: { processorToken: "processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }); ``` ```go BankAccountPlaidProcessorToken package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"plaid\": {\n \"processorToken\": \"processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccountPlaidProcessorToken require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"plaid\": {\n \"processorToken\": \"processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java BankAccountPlaidProcessorToken import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"plaid\": {\n \"processorToken\": \"processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") .asString(); ``` ```php BankAccountPlaidProcessorToken request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "plaid": { "processorToken": "processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccountPlaidProcessorToken using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"99988767623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"12345678\",\n \"plaid\": {\n \"processorToken\": \"processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccountPlaidProcessorToken import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "99988767623", "accountType": "CHECKING", "routingNumber": "12345678", "plaid": ["processorToken": "processor-sandbox-af1a0311-da53-4636-b754-dd15cc058176"] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### BankAccountPlaidAccessToken **Request** ```json { "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "accessToken": "access-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } ``` **Response** ```json { "type": "bankAccount", "accountName": "My Checking Account", "accountNumber": "99988767623", "accountType": "CHECKING", "bankName": "Chase", "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769", "isDefaultDestination": true, "isDefaultSource": true, "metadata": {}, "routingNumber": "12345678", "status": "VERIFIED", "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": true } ``` **SDK Code** ```python BankAccountPlaidAccessToken import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "accessToken": "access-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BankAccountPlaidAccessToken import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "bankAccount", routingNumber: "", accountNumber: "7623", accountType: "CHECKING", plaid: { accessToken: "access-sandbox-af1a0311-da53-4636-b754-dd15cc058176", accountId: "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }); ``` ```go BankAccountPlaidAccessToken package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"accessToken\": \"access-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BankAccountPlaidAccessToken require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"accessToken\": \"access-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java BankAccountPlaidAccessToken import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"accessToken\": \"access-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}") .asString(); ``` ```php BankAccountPlaidAccessToken request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": { "accessToken": "access-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BankAccountPlaidAccessToken using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"bankAccount\",\n \"accountNumber\": \"7623\",\n \"accountType\": \"CHECKING\",\n \"routingNumber\": \"\",\n \"plaid\": {\n \"accessToken\": \"access-sandbox-af1a0311-da53-4636-b754-dd15cc058176\",\n \"accountId\": \"account-sandbox-af1a0311-da53-4636-b754-dd15cc058176\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BankAccountPlaidAccessToken import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "bankAccount", "accountNumber": "7623", "accountType": "CHECKING", "routingNumber": "", "plaid": [ "accessToken": "access-sandbox-af1a0311-da53-4636-b754-dd15cc058176", "accountId": "account-sandbox-af1a0311-da53-4636-b754-dd15cc058176" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Wallet **Request** ```json { "type": "wallet" } ``` **Response** ```json { "type": "wallet", "availableBalance": { "amount": 100, "currency": "USD" }, "createdAt": "2021-01-01T00:00:00Z", "frozen": false, "id": "pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18", "isDefaultDestination": false, "isDefaultSource": false, "metadata": {}, "pendingBalance": { "amount": 5, "currency": "USD" }, "supportedCurrencies": [ "USD" ], "updatedAt": "2021-01-01T00:00:00Z", "confirmedByEntity": true } ``` **SDK Code** ```python Wallet import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload = { "type": "wallet" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript Wallet import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.paymentMethod.create("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", { type: "wallet" }); ``` ```go Wallet package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod" payload := strings.NewReader("{\n \"type\": \"wallet\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Wallet require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"wallet\"\n}" response = http.request(request) puts response.read_body ``` ```java Wallet import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"wallet\"\n}") .asString(); ``` ```php Wallet request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod', [ 'body' => '{ "type": "wallet" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Wallet using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"wallet\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Wallet import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["type": "wallet"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/paymentMethod")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```