---
title: "Create a contract with a card token for a Merchant's Customer"
method: POST
path: "/merchants/{merchant_id}/contracts/card"
tags: ["Contracts"]
---

# Create a contract with a card token for a Merchant's Customer

`POST /merchants/{merchant_id}/contracts/card`

## Request

- Base URL: `https://tb.paymentfusion.com`
- URL: `https://tb.paymentfusion.com/merchants/{merchant_id}/contracts/card`
- Auth: none declared. Required headers: `Authorization`, `Accept`, `Content-Type`
- TypeScript: <https://skmtc.dev/bankofamerica/apis/transaction-broker-api/docs/merchants/:merchant_id/contracts/card/post.ts> (a function with typed inputs; its response is checked against the schema)

Called by the Independent Software Vendor. Allows creating of contracts with card tokens.

## Path parameters

- `merchant_id` string, required

## Headers

- `Authorization` string, api_id:api_token, required
- `Accept` string, required
- `Content-Type` string, required

## Request body `application/x-www-form-urlencoded`

- object
  - `bill_amount` integer, required: Sets the monetary amount to charge on each cycle. Specified in USD.
  - `start_date` string: Must be entered in YYYYMMDD format. If not set, the default value will be the date of tomorrow. For example, if today is 1/10/2009 and schedule=monthly then start_date will be set to 2/10/2009. If set to "next" the date of the next billing cycle will be used. For example, if today is 1/10/2009 and schedule=monthly then start_date will be set to 2/10/2009. Can also be entered as "first of month" or "last day of month".
  - `schedule` string: Frequency of recurring billing schedule. Will be ignored if recurring is not sent as "true". Allowed values - "disabled","daily","weekly","bi-weekly", "monthly","bi-monthly","quarterly","bi-annually","annually". If set to "disabled" the contract will have the schedule set to "monthly" and status set to "disabled".
  - `num_left` integer: Number of transactions remaining in the recurring billing cycle. Will be ignored if recurring is not sent as "true". Can take the value of *, which is interpreted as recurring payment for unlimited time.
  - `token` string, required: The credit card token.
  - `enabled` boolean: Indicates whether the contract will be enabled or disabled when created.

## Response `200`

Success

- object
  - `contract` ContractWithToken
    - `customer_id` string: Customer identifier associated to a transaction
    - `bill_amount` string: Sets the monetary amount to charge on each cycle. This is NOT the "initial" charge or "setup" charge, this is only the "recurring" charge. Described in USD up to 6 decimals, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
    - `status` 'enabled' | 'disabled' | 'completed': Description of contract status.
    - `start_date` string: Date formatted as YYYYMMDD.
    - `end_date` string: Date formatted as YYYYMMDD. The end_date is the next day after the last installment. For example if last installment was on 20210305 then the end_date will be 20210306. For a contract with unlimited number of installments the end_date will be `"none"`.
    - `schedule` string: Frequency of recurring billing schedule. Allowed values - `"daily"`,`"weekly"`,`"bi-weekly"`,`"monthly"`,`"bi-monthly"`,`"quarterly"`,`"bi-annually"`,`"annually"`.
    - `num_left` string: Number of transactions remaining in recurring billing cycle. When a contract is completed, the num_left will be returned as `0` When the contract is created with unlimited number of installments, the num_left will be returned as `*`
  - `v` string: The API version that was used to handle the request.

## Other responses

- `4XX`: Possible errors - 1, 6, 24, 25, 26, 27, 70, 189, 318, 319,
- `5XX`: Possible errors - 8

---

[API](https://skmtc.dev/bankofamerica/apis/transaction-broker-api.md) - [All operations](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/revisions/6097bc689e41?raw)
