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
  • 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
ChainIdformint?No
ApiKeyformstringNo
StoreIdformint?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
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 .csv suffix or ?format=csv

HTTP + CSV

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: www.clubready.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ApiKey":"String","ChainId":0,"StoreId":0,"PackageId":0,"InstallmentPlanId":0,"PaymentAmount":0,"StartDate":"0001-01-01T00:00:00.0000000","FirstName":"String","LastName":"String","Email":"String","Gender":"String","Address":"String","City":"String","State":"String","Zip":"String","Phone":"String","WorkPhone":"String","DateOfBirth":"0001-01-01T00:00:00.0000000","CellPhone":"String","Note":"String","ExternalId":"String","PromoCode":"String","Username":"String","ReferralTypeId":0,"EmergencyContactName":"String","EmergencyContactPhone":"String","EmergencyContactType":"String","PaymentMethods":[{"AcctToken":"String","ProfileToken":"String","PaymentProfileId":"String","PaymentAmount":0,"PaymentMethodType":"Uninitialized","DoNotUpdatePaymentTypePreference":false}],"RestrictedId":0,"RestrictedResourceType":"Chain","AuthToken":"String","AcctToken":"String","Last4":"String","ExpMonth":0,"ExpYear":0,"AcctType":"Uninitialized","CardType":0,"BnkRoute":0,"IsTemp":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{}