POST | /sales/contract/sold/new/user | Create 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. |
---|
Name | Parameter | Data Type | Required | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ApiKey | query | string | Yes | Api Authentication Key | ||||||||||||||||||||||||
ChainId | query | int? | No | Id for the chain of the Api Key | ||||||||||||||||||||||||
StoreId | query | int? | Yes | Id of the store for the user | ||||||||||||||||||||||||
PackageId | body | int | Yes | Package Id being sold | ||||||||||||||||||||||||
InstallmentPlanId | body | int | Yes | Installment Plan Id being sold | ||||||||||||||||||||||||
PaymentAmount | body | decimal | Yes | Amount being paid | ||||||||||||||||||||||||
StartDate | body | DateTime? | No | Date contract takes affect | ||||||||||||||||||||||||
FirstName | body | string | Yes | First Name | ||||||||||||||||||||||||
LastName | body | string | Yes | Last Name | ||||||||||||||||||||||||
body | string | Yes | Email Address | |||||||||||||||||||||||||
Gender | body | string | No | Gender | ||||||||||||||||||||||||
Address | body | string | No | Address | ||||||||||||||||||||||||
City | body | string | No | City | ||||||||||||||||||||||||
State | body | string | No | State | ||||||||||||||||||||||||
Zip | body | string | No | Zip Code | ||||||||||||||||||||||||
Phone | body | string | No | Home phone | ||||||||||||||||||||||||
WorkPhone | body | string | No | Work phone | ||||||||||||||||||||||||
DateOfBirth | body | DateTime? | No | Date of Birth | ||||||||||||||||||||||||
CellPhone | body | string | No | Cell phone | ||||||||||||||||||||||||
Note | body | string | No | Add an internal note for the new prospect | ||||||||||||||||||||||||
ExternalId | body | string | No | Unique Id for the user from your system. We store internally as ExternalUserId | ||||||||||||||||||||||||
PromoCode | body | string | No | Promo code to apply a discount. | ||||||||||||||||||||||||
Username | body | string | No | Username should be between 4 and 255 characters long | ||||||||||||||||||||||||
ReferralTypeId | body | int? | No | ReferralTypeId | ||||||||||||||||||||||||
EmergencyContactName | body | string | No | Emergency contact name | ||||||||||||||||||||||||
EmergencyContactPhone | body | string | No | Emergency contact phone number | ||||||||||||||||||||||||
EmergencyContactType | body | string | No | Emergency contact relationship | ||||||||||||||||||||||||
PaymentMethods | body | List<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. | ||||||||||||||||||||||||
RestrictedId | body | int? | No | |||||||||||||||||||||||||
RestrictedResourceType | body | RestrictedResourceType | No | |||||||||||||||||||||||||
AcctToken | body | string | No | **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. | ||||||||||||||||||||||||
Last4 | body | string | No | **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Last 4 digits of the Payment Profile. Required with AcctToken. | ||||||||||||||||||||||||
ExpMonth | body | int? | No | **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration month. **Required with AcctToken for Credit Card.** | ||||||||||||||||||||||||
ExpYear | body | int? | No | **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration year. **Required with AcctToken for Credit Card.** | ||||||||||||||||||||||||
AcctType | body | AcctType? | No |
**Deprecated** (Use `PaymentMethods` with `ProfileToken`)
The Account Type the Payment Profile
Common Values
You may use the Text or the Numerical value. Allowable Values
| ||||||||||||||||||||||||
BnkRoute | body | int? | No |
**Deprecated** (Use `PaymentMethods` with `ProfileToken`)
Bank Routing Number. **Required with AcctToken for Bank Accounts.**Valid Range: 0 - 999999999 | ||||||||||||||||||||||||
IsTemp | body | bool | No | **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Whether the Payment Profile is Temporary. (One time transactions and Gift Cards are IsTemp = True). |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcctToken | form | string | No | |
Last4 | form | string | No | |
ExpMonth | form | int? | No | |
ExpYear | form | int? | No | |
AcctType | form | AcctType? | No | |
BnkRoute | form | int? | No | |
IsTemp | form | bool | No | |
PackageId | form | int | No | |
InstallmentPlanId | form | int | No | |
PaymentAmount | form | decimal | No | |
StartDate | form | DateTime? | No | |
FirstName | form | string | No | |
LastName | form | string | No | |
Address | form | string | No | |
City | form | string | No | |
State | form | string | No | |
Zip | form | string | No | |
form | string | No | ||
Gender | form | string | No | |
Phone | form | string | No | |
WorkPhone | form | string | No | |
DateOfBirth | form | DateTime? | No | |
CellPhone | form | string | No | |
Note | form | string | No | |
ExternalId | form | string | No | |
PromoCode | form | string | No | |
Username | form | string | No | |
ReferralTypeId | form | int? | No | |
EmergencyContactName | form | string | No | |
EmergencyContactPhone | form | string | No | |
EmergencyContactType | form | string | No | |
PaymentMethods | form | List<PaymentMethodDto> | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ApiKey | form | string | No | |
StoreId | form | int? | No | |
ChainId | form | int? | No |
Name | Value | |
---|---|---|
Uninitialized | 0 | Uninitialized |
Visa | 1 | VISA |
MC | 2 | MasterCard |
Disc | 3 | Discover |
Amex | 4 | American Express |
Diners | 5 | Diners |
JCB | 6 | JCB |
enRoute | 7 | enRoute |
PayPal | 8 | PayPal |
BillMe | 9 | Bill Me Later |
PC | 11 | Personal Checking |
PS | 12 | Personal Savings |
BC | 13 | Business Checking |
BS | 14 | Business Savings |
Becs | 15 | BECS Direct Debit |
Bacs | 16 | BACS Direct Debit |
Maestro | 20 | Maestro |
Solo | 21 | Solo |
VisaElectron | 22 | Visa Electron |
CIBC | 23 | CIBC Convenience Card |
RoyalBankCa | 24 | Royal Bank of Canada Client |
TDCaTrust | 25 | TD Canada Trust Access Card |
Scotia | 26 | Scotiabank Scotia Card |
BMO | 27 | BMO ABM Card |
HSBCCa | 28 | HSBC Canada Card |
UnionPay | 29 | China UnionPay |
InterPayment | 30 | InterPayment |
Laser | 31 | Laser |
UnknownCredit | 40 | Unknown Credit Card |
TransArmor | 41 | TransArmor |
Factor4 | 42 | Factor4 |
XPass | 43 | XPass |
ConnectedAccount | 44 | Connected Account |
UnknownBank | 45 | Unknown Bank Account |
Error | -1 | Error |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcctToken | form | string | No | |
ProfileToken | form | string | No | |
PaymentProfileId | form | string | No | |
PaymentAmount | form | decimal? | No | |
PaymentMethodType | form | PaymentMethodType? | No | |
DoNotUpdatePaymentTypePreference | form | bool? | No |
Name | Value | |
---|---|---|
Uninitialized | 0 | Uninitialized |
PaymentProfileId | 1 | PaymentProfileId |
PreferredOnFile | 2 | PreferredOnFile |
AcctToken | 3 | AcctToken |
Error | -1 | Error |
Store | |
Chain | |
User | |
Undefined |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=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: 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 {}