Syntch Gateway API

<back to all web services

GetContracts

Administration - Recurring Billing Contracts
Requires Authentication
Requires the role:Merchant
The following routes are available for this service:
GET/merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKeys}Get details for one or more contracts.
GetContracts Parameters:
NameParameterData TypeRequiredDescription
MerchantKeypathintegerYesThe key of the merchant.
CustomerKeypathintegerYesThe customer key.
ContractKeyspathintegerYesA comma separated list of contract keys. Limit 10.
ContractDetail Parameters:
NameParameterData TypeRequiredDescription
ContractKeyformintNo
MerchantKeyformintNo
CustomerKeyformintNo
TokenformstringNo
BillAmountformdecimalNo
StartDateformDateTime?No
EndDateformDateTime?No
MerchantContractNameformstringNo
MerchantContractIdformstringNo
BillingIntervalformint?No
BillingPeriodformstringNo
ActivationStatusformstringNo
MaxFailuresformint?No
FailureIntervalformint?No
FailurePeriodformstringNo
EmailMerchantformboolNo
EmailCustomerformboolNo
EmailMerchantFailureformboolNo
EmailCustomerFailureformboolNo
TaxAmountformdecimalNo
TotalAmountformdecimalNo
MaxAmountformdecimal?No
CustomFieldsformList<ContractCustomField>No
AmountBillsToDateformdecimalNo
EmailCustomerReceiptOptionformstringNo
NextBillDateformDateTime?No
NumberPaymentsformint?No
NumberBillsToDateformint?No
NumberFailuresformint?No
ContractCustomField Parameters:
NameParameterData TypeRequiredDescription
CustomValueformstringNo
CustomKeyformintNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /merchants/{merchantKey}/customers/{customerKey}/contracts/{contractKeys} HTTP/1.1 
Host: syntch.simpay.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContractDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gateway.RestApi.Contracts.Responses">
  <ActivationStatus>String</ActivationStatus>
  <AmountBillsToDate>0</AmountBillsToDate>
  <BillAmount>0</BillAmount>
  <BillingInterval>0</BillingInterval>
  <BillingPeriod>String</BillingPeriod>
  <ContractKey>0</ContractKey>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/Gateway.RestApi.Contracts.DTO">
    <d2p1:ContractCustomField>
      <d2p1:CustomKey>0</d2p1:CustomKey>
      <d2p1:CustomValue>String</d2p1:CustomValue>
    </d2p1:ContractCustomField>
  </CustomFields>
  <CustomerKey>0</CustomerKey>
  <EmailCustomer>false</EmailCustomer>
  <EmailCustomerFailure>false</EmailCustomerFailure>
  <EmailCustomerReceiptOption>String</EmailCustomerReceiptOption>
  <EmailMerchant>false</EmailMerchant>
  <EmailMerchantFailure>false</EmailMerchantFailure>
  <EndDate>0001-01-01T00:00:00</EndDate>
  <FailureInterval>0</FailureInterval>
  <FailurePeriod>String</FailurePeriod>
  <MaxAmount>0</MaxAmount>
  <MaxFailures>0</MaxFailures>
  <MerchantContractId>String</MerchantContractId>
  <MerchantContractName>String</MerchantContractName>
  <MerchantKey>0</MerchantKey>
  <NextBillDate>0001-01-01T00:00:00</NextBillDate>
  <NumberBillsToDate>0</NumberBillsToDate>
  <NumberFailures>0</NumberFailures>
  <NumberPayments>0</NumberPayments>
  <StartDate>0001-01-01T00:00:00</StartDate>
  <TaxAmount>0</TaxAmount>
  <Token>String</Token>
  <TotalAmount>0</TotalAmount>
</ContractDetail>