MiPaymentChoice API: Recurring Billing Contracts
Jump to navigation
Jump to search
General
Routes
Route | Description |
---|---|
GET /merchants/{merchantKey}/contracts | Get all contract details for a merchant. |
GET /merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKeys} | Get details for one or more contracts. |
GET /merchants/{merchantKey}/customers/{customerKey}/contracts | Get all contract details for a customer. |
DELETE /merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKeys} | Delete one or more contracts. |
POST /merchants/{merchantKey}/customers/{customerKey}/contracts | Create a new recurring billing contract for a customer. |
PATCH /merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKey} | Update a recurring billing contract for a customer. |
PUT /merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKey} | Replace a recurring billing contract for a customer. |
Request Headers
Header | Value |
---|---|
Authentication | Bearer [authentication (JWT) token] |
Content-Type | application/json |
Request Body
{
"CustomerKey": 0,
"Token": "string",
"BillAmount": 0,
"StartDate": "2019-02-23T20:00:39.917Z",
"EndDate": "2019-02-23T20:00:39.917Z",
"MerchantContractName": "string",
"MerchantContractId": "string",
"MaxFailures": 0,
"BillingInterval": "2",
"FailureInterval": 0,
"EmailMerchant": true,
"EmailCustomer": true,
"EmailMerchantFailure": true,
"EmailCustomerFailure": true,
"TaxAmount": 0,
"TotalAmount": 0,
"MaxAmount": 0,
"CustomFields": [
{
"Value": "string",
"Key": 0
}
],
"BillingPeriod": "WEEK",
"ActivationStatus": "Active",
"FailurePeriod": "WEEK",
"EmailCustomerReceiptOption": "OnApproval"
}
Parameter Details
Property | Required | Data | Additional Information |
---|---|---|---|
CustomerKey | Yes | Numeric | The customer that owns this recurring billing contract. |
Token | Yes | String | The payment data token that will be used on this contract. |
BillAmount | Yes | Numeric | The amount that will be billed on this contract. |
MerchantContractName | String | A name assigned to the contract by the merchant. | |
MerchantContractId | String | An identifier assigned to the contract by the merchant. | |
StartDate | Yes | DateTime | The starting date that will be used on this contract. |
EndDate | Yes | DateTime | The ending date that will be used on this contract. |
ActivationStatus | Yes | Enumeration | Defaults to 'Active'. 'Pending', 'Active', 'Inactive', 'Deleted'. |
CustomFields | Array | Allows custom data to be associated with each bill from this contract. |
Response Body
{
"ContractKey": 0,
"MerchantKey": 0,
"CustomerKey": 0,
"Token": "string",
"BillAmount": 0,
"StartDate": "2019-02-23T20:00:39.912Z",
"EndDate": "2019-02-23T20:00:39.912Z",
"MerchantContractName": "string",
"MerchantContractId": "string",
"BillingInterval": 0,
"BillingPeriod": "string",
"ActivationStatus": "string",
"MaxFailures": 0,
"FailureInterval": 0,
"FailurePeriod": "string",
"EmailMerchant": true,
"EmailCustomer": true,
"EmailMerchantFailure": true,
"EmailCustomerFailure": true,
"TaxAmount": 0,
"TotalAmount": 0,
"MaxAmount": 0,
"CustomFields": [
{
"Value": "string",
"Key": 0
}
],
"AmountBillsToDate": 0,
"EmailCustomerReceiptOption": "string",
"NextBillDate": "2019-02-23T20:00:39.912Z",
"NumberPayments": 0,
"NumberBillsToDate": 0,
"NumberFailures": 0
}