ClubReady Api

<back to all web services

SellContractAndSetupClientRequest

The following routes are available for this service:
POST/sales/contract/sold/new/userCreate a user and sell them a package Create a user and sell them a package. **New Operation** The PaymentMethods property is an array of objects describing how you want ClubReady to take payment while selling the PackageId/InstallmentPlanId. The deprecated fields (AcctToken, Last4, ExpMonth, ExpYear, AcctType, BnkRoute, and IsTemp) must be omitted or null. **Deprecated Operation** Provide the AcctToken, Last4, ExpMonth, ExpYear, AcctType, BnkRoute, and IsTemp used in the ClubReadyGateway API in order to create a Payment Profile to the user specified. PaymentMethods must be omitted or null.
SellContractAndSetupClientRequest Parameters:
NameParameterData TypeRequiredDescription
ApiKeyquerystringYesApi Authentication Key
ChainIdqueryint?NoId for the chain of the Api Key
StoreIdqueryint?YesId of the store for the user
PackageIdbodyintYesPackage Id being sold
InstallmentPlanIdbodyintYesInstallment Plan Id being sold
PaymentAmountbodydecimalYesAmount being paid
StartDatebodyDateTime?NoDate contract takes affect
FirstNamebodystringYesFirst Name
LastNamebodystringYesLast Name
EmailbodystringYesEmail Address
GenderbodystringNoGender
AddressbodystringNoAddress
CitybodystringNoCity
StatebodystringNoState
ZipbodystringNoZip Code
PhonebodystringNoHome phone
WorkPhonebodystringNoWork phone
DateOfBirthbodyDateTime?NoDate of Birth
CellPhonebodystringNoCell phone
NotebodystringNoAdd an internal note for the new prospect
ExternalIdbodystringNoUnique Id for the user from your system. We store internally as ExternalUserId
PromoCodebodystringNoPromo code to apply a discount.
UsernamebodystringNoUsername should be between 4 and 255 characters long
ReferralTypeIdbodyint?NoReferralTypeId
EmergencyContactNamebodystringNoEmergency contact name
EmergencyContactPhonebodystringNoEmergency contact phone number
EmergencyContactTypebodystringNoEmergency contact relationship
PaymentMethodsbodyList<PaymentMethodDto>No An array of Payment Methods to be used for this purchase. Any entry with PreferredOnFile is assumed if omitted or null. Each object of the array may contain properties: | Property | Description | | --- | --- | | PaymentMethodType | Usually "AcctToken" (Default or omitted/null) or "PreferredOnFile" | | PaymentAmount | The amount to be attempted for this Payment Method. When omitted (or null), the Request's PaymentAmount will be attempted | | AcctToken | The AcctToken to attempt payment (when using PaymentMethodType:AcctToken) | | ProfileToken | When provided (with AcctToken), a Payment Profile will be created (this will prevent the requirement to call `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) | | DoNotUpdatePaymentTypePreference | When using ProfileToken, do not set the PaymentTypePreference (for more information, see `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) | | | | * Scenario #1: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. JSON: ```json { PaymentMethods: [ { "PaymentMethodType":"AcctToken", "PaymentAmount":"1.00", "AcctToken":"eyJ...GiftCard AcctToken...", "ProfileToken":"eyJ...Gift Card ProfileToken..." }, { "PaymentMethodType":"PreferredOnFile", "PaymentAmount":"1.00" } ] } ``` JSV: ``` [{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}] ``` * Scenario #2: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. JSON: ```json { PaymentMethods: [ { "PaymentMethodType":"AcctToken", "PaymentAmount":"1.00", "AcctToken":"eyJ...GiftCard AcctToken...", "ProfileToken":"eyJ...Gift Card ProfileToken..." }, { "PaymentMethodType":"PreferredOnFile", "PaymentAmount":"1.00" } ] } ``` JSV: ```jsv [{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}] ``` Notes: * The example shows PaymentAmount of 1.00 for both "AcctToken" and "PreferredOnFile". This is for the example with a total of $1.00. The firstPaymentMethod (the Gift Card) will be attempted for $1.00. If it partially approves for less than 1.00 (example: $0.80), the second payment method (PreferredOnFile) will be attempted for the lesser of it's PaymentAmount and the remaining amount (example: $0.20). * Because this endpoint creates a new user, the "PreferredOnFile" option is not applicable. Also, ProfileToken with the OwnerType "TempstUser" is required because the Payment Profile owner will be converted to the newly created user. * When using Query String (or this web site), this value must be encoded with JSV [(JSON-like Separated Values)](https://docs.servicestack.net/jsv-format). Basic steps to convert JSON to JSV: 1) Remove properties that are null, 2) Remove white space including line feeds, 3) Remove quotes.
RestrictedIdbodyint?No
RestrictedResourceTypebodyRestrictedResourceTypeNo
AcctTokenbodystringNo **Deprecated** (Use `PaymentMethods` with `ProfileToken`) AcctToken provided by creating a Payment Profile with the Vault Api. Required if Package requires purchase and PaymentMethods is empty.
Last4bodystringNo **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Last 4 digits of the Payment Profile. Required with AcctToken.
ExpMonthbodyint?No **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration month. **Required with AcctToken for Credit Card.**
ExpYearbodyint?No **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration year. **Required with AcctToken for Credit Card.**
AcctTypebodyAcctType?No **Deprecated** (Use `PaymentMethods` with `ProfileToken`) The Account Type the Payment Profile
Common Values
TextNumericalAccount Type
VISA1Visa
MC2MasterCard
Disc3Discover
Amex4American Express
PC11Personal Checking
PS12Personal Savings
BC13Business Checking

You may use the Text or the Numerical value.

Allowable Values

  • Uninitialized
  • Visa
  • MC
  • Disc
  • Amex
  • Diners
  • JCB
  • enRoute
  • PayPal
  • BillMe
  • PC
  • PS
  • BC
  • BS
  • Becs
  • Bacs
  • Maestro
  • Solo
  • VisaElectron
  • CIBC
  • RoyalBankCa
  • TDCaTrust
  • Scotia
  • BMO
  • HSBCCa
  • UnionPay
  • InterPayment
  • Laser
  • UnknownCredit
  • TransArmor
  • Factor4
  • XPass
  • ConnectedAccount
  • UnknownBank
  • Error
BnkRoutebodyint?No **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Bank Routing Number. **Required with AcctToken for Bank Accounts.**

Valid Range: 0 - 999999999

IsTempbodyboolNo **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Whether the Payment Profile is Temporary. (One time transactions and Gift Cards are IsTemp = True).
SellContractAndSetupClientDto Parameters:
NameParameterData TypeRequiredDescription
AcctTokenformstringNo
Last4formstringNo
ExpMonthformint?No
ExpYearformint?No
AcctTypeformAcctType?No
BnkRouteformint?No
IsTempformboolNo
PackageIdformintNo
InstallmentPlanIdformintNo
PaymentAmountformdecimalNo
StartDateformDateTime?No
FirstNameformstringNo
LastNameformstringNo
AddressformstringNo
CityformstringNo
StateformstringNo
ZipformstringNo
EmailformstringNo
GenderformstringNo
PhoneformstringNo
WorkPhoneformstringNo
DateOfBirthformDateTime?No
CellPhoneformstringNo
NoteformstringNo
ExternalIdformstringNo
PromoCodeformstringNo
UsernameformstringNo
ReferralTypeIdformint?No
EmergencyContactNameformstringNo
EmergencyContactPhoneformstringNo
EmergencyContactTypeformstringNo
PaymentMethodsformList<PaymentMethodDto>No
ApiDtoBase Parameters:
NameParameterData TypeRequiredDescription
ApiKeyformstringNo
StoreIdformint?No
ChainIdformint?No
AcctType Enum:
NameValue
Uninitialized0Uninitialized
Visa1VISA
MC2MasterCard
Disc3Discover
Amex4American Express
Diners5Diners
JCB6JCB
enRoute7enRoute
PayPal8PayPal
BillMe9Bill Me Later
PC11Personal Checking
PS12Personal Savings
BC13Business Checking
BS14Business Savings
Becs15BECS Direct Debit
Bacs16BACS Direct Debit
Maestro20Maestro
Solo21Solo
VisaElectron22Visa Electron
CIBC23CIBC Convenience Card
RoyalBankCa24Royal Bank of Canada Client
TDCaTrust25TD Canada Trust Access Card
Scotia26Scotiabank Scotia Card
BMO27BMO ABM Card
HSBCCa28HSBC Canada Card
UnionPay29China UnionPay
InterPayment30InterPayment
Laser31Laser
UnknownCredit40Unknown Credit Card
TransArmor41TransArmor
Factor442Factor4
XPass43XPass
ConnectedAccount44Connected Account
UnknownBank45Unknown Bank Account
Error-1Error
PaymentMethodDto Parameters:
NameParameterData TypeRequiredDescription
AcctTokenformstringNo
ProfileTokenformstringNo
PaymentProfileIdformstringNo
PaymentAmountformdecimal?No
PaymentMethodTypeformPaymentMethodType?No
DoNotUpdatePaymentTypePreferenceformbool?No
PaymentMethodType Enum:
NameValue
Uninitialized0Uninitialized
PaymentProfileId1PaymentProfileId
PreferredOnFile2PreferredOnFile
AcctToken3AcctToken
Error-1Error
RestrictedResourceType Enum:
Store
Chain
User
Undefined

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.

POST /sales/contract/sold/new/user HTTP/1.1 
Host: clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SellContractAndSetupClientRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Model">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <AcctToken xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</AcctToken>
  <AcctType xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">Uninitialized</AcctType>
  <Address xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Address>
  <BnkRoute xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</BnkRoute>
  <CellPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</CellPhone>
  <City xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</City>
  <DateOfBirth xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</DateOfBirth>
  <Email xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Email>
  <EmergencyContactName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactName>
  <EmergencyContactPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactPhone>
  <EmergencyContactType xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactType>
  <ExpMonth xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ExpMonth>
  <ExpYear xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ExpYear>
  <ExternalId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ExternalId>
  <FirstName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</FirstName>
  <Gender xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Gender>
  <InstallmentPlanId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</InstallmentPlanId>
  <IsTemp xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</IsTemp>
  <Last4 xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Last4>
  <LastName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</LastName>
  <Note xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Note>
  <PackageId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</PackageId>
  <PaymentAmount xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</PaymentAmount>
  <PaymentMethods xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <PaymentMethodDto>
      <AcctToken>String</AcctToken>
      <DoNotUpdatePaymentTypePreference>false</DoNotUpdatePaymentTypePreference>
      <PaymentAmount>0</PaymentAmount>
      <PaymentMethodType>Uninitialized</PaymentMethodType>
      <PaymentProfileId>String</PaymentProfileId>
      <ProfileToken>String</ProfileToken>
    </PaymentMethodDto>
  </PaymentMethods>
  <Phone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Phone>
  <PromoCode xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</PromoCode>
  <ReferralTypeId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ReferralTypeId>
  <StartDate xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</StartDate>
  <State xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</State>
  <Username xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Username>
  <WorkPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</WorkPhone>
  <Zip xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Zip>
  <AuthToken>String</AuthToken>
  <CardType>0</CardType>
</SellContractAndSetupClientRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />