ClubReady Api

<back to all web services

PaymentProfileImportEndpoint

The following routes are available for this service:
POST/sales/paymentprofile/importImport a Payment Profile (using ProfileToken) After a Payment Profile is created in the ClubReadyGateway API (aka Vault API), the information has to be imported into the ClubReady system. The AcctToken and ProfileToken are created by the ClubReadyGateway API.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="", ResponseType=PaymentProfileImportResponse.class, StatusCode=200)
    public static class PaymentProfileImportEndpoint extends PaymentProfileImportRequest implements IApiKeyEndpoint
    {
        /**
        * Api Authentication Key
        */
        @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")
        public String ApiKey = null;

        /**
        * Encoded data uniquely identifying the payment profile.  Long term storage of AcctToken is not recommended, as the token may change over time (for example, by processes like Account Updater).  The length is usually 80 characters.
        */
        @ApiMember(Description="\r\nEncoded data uniquely identifying the payment profile.  \r\nLong term storage of AcctToken is not recommended, as the token may change over time (for example, by processes like Account Updater).  \r\nThe length is usually 80 characters.", IsRequired=true)
        public String AcctToken = null;

        /**
        * Encoded data containing non-PCI information about the Payment Profile.  ProfileTokens contain a timestamp. If the ClubReady API does not process the token within 5 minutes,it cannot be accepted and a new profile will have to be created with a new AcctToken. The timevalidation is to prevent old tokens from be re-played at a later time.  The length is variable, but generally around 1,000 characters.
        */
        @ApiMember(Description="\r\nEncoded data containing non-PCI information about the Payment Profile.  \r\n\r\nProfileTokens contain a timestamp. If the ClubReady API does not process the token within 5 minutes,\r\nit cannot be accepted and a new profile will have to be created with a new AcctToken. The time\r\nvalidation is to prevent old tokens from be re-played at a later time.  \r\n\r\nThe length is variable, but generally around 1,000 characters.", IsRequired=true)
        public String ProfileToken = null;

        /**
        * When adding a Payment Profile that is 'on-file', the default behavior is to update the user's Payment TypePreference to the AcctClass of the new profile. If you wish to not update the preference, you can set`DoNotUpdatePaymentTypePreference` to `true`. Otherwise, this can be omitted or `false`.  For `IsTemp == true` profiles, `DoNotUpdatePaymentTypePreference` is ignored.
        */
        @ApiMember(Description="\r\nWhen adding a Payment Profile that is 'on-file', the default behavior is to update the user's Payment Type\r\nPreference to the AcctClass of the new profile. If you wish to not update the preference, you can set\r\n`DoNotUpdatePaymentTypePreference` to `true`. Otherwise, this can be omitted or `false`.  \r\n\r\nFor `IsTemp == true` profiles, `DoNotUpdatePaymentTypePreference` is ignored.")
        public Boolean DoNotUpdatePaymentTypePreference = null;

        /**
        * **Conditionally Required**  When adding a Payment Profile that has an OwnerType of `TempStUser`, the ownership will be changed to OwnerType of `User`with the `UserId` of the supplied `NewOwnerId`.
        */
        @ApiMember(Description="\r\n**Conditionally Required**  \r\n\r\nWhen adding a Payment Profile that has an OwnerType of `TempStUser`, the ownership will be changed to OwnerType of `User`\r\nwith the `UserId` of the supplied `NewOwnerId`.")
        public Integer NewOwnerId = null;
        
        public String getApiKey() { return ApiKey; }
        public PaymentProfileImportEndpoint setApiKey(String value) { this.ApiKey = value; return this; }
        public String getAcctToken() { return AcctToken; }
        public PaymentProfileImportEndpoint setAcctToken(String value) { this.AcctToken = value; return this; }
        public String getProfileToken() { return ProfileToken; }
        public PaymentProfileImportEndpoint setProfileToken(String value) { this.ProfileToken = value; return this; }
        public Boolean isDoNotUpdatePaymentTypePreference() { return DoNotUpdatePaymentTypePreference; }
        public PaymentProfileImportEndpoint setDoNotUpdatePaymentTypePreference(Boolean value) { this.DoNotUpdatePaymentTypePreference = value; return this; }
        public Integer getNewOwnerId() { return NewOwnerId; }
        public PaymentProfileImportEndpoint setNewOwnerId(Integer value) { this.NewOwnerId = value; return this; }
    }

    public static class PaymentProfileImportRequest
    {
        public String AcctToken = null;
        public String ProfileToken = null;
        public Boolean DoNotUpdatePaymentTypePreference = null;
        public ValueTuple<Integer,OwnerType> NewOwner = null;
        
        public String getAcctToken() { return AcctToken; }
        public PaymentProfileImportRequest setAcctToken(String value) { this.AcctToken = value; return this; }
        public String getProfileToken() { return ProfileToken; }
        public PaymentProfileImportRequest setProfileToken(String value) { this.ProfileToken = value; return this; }
        public Boolean isDoNotUpdatePaymentTypePreference() { return DoNotUpdatePaymentTypePreference; }
        public PaymentProfileImportRequest setDoNotUpdatePaymentTypePreference(Boolean value) { this.DoNotUpdatePaymentTypePreference = value; return this; }
        public ValueTuple<Integer,OwnerType> getNewOwner() { return NewOwner; }
        public PaymentProfileImportRequest setNewOwner(ValueTuple<Integer,OwnerType> value) { this.NewOwner = value; return this; }
    }

    public static class PaymentProfileImportResponse
    {
        public Boolean Success = null;
        public String Message = null;
        public PaymentProfile PaymentProfile = null;
        
        public Boolean isSuccess() { return Success; }
        public PaymentProfileImportResponse setSuccess(Boolean value) { this.Success = value; return this; }
        public String getMessage() { return Message; }
        public PaymentProfileImportResponse setMessage(String value) { this.Message = value; return this; }
        public PaymentProfile getPaymentProfile() { return PaymentProfile; }
        public PaymentProfileImportResponse setPaymentProfile(PaymentProfile value) { this.PaymentProfile = value; return this; }
    }

    public static class PaymentProfile
    {
        public Integer PaymentProfileId = null;
        public String AcctToken = null;
        public Integer OwnerId = null;
        public Short OwnerTypeId = null;
        public Short AcctTypeId = null;
        public Short AcctClassId = null;
        public String PrefixName = null;
        public String FirstName = null;
        public String MiddleName = null;
        public String LastName = null;
        public String SuffixName = null;
        public String Address1 = null;
        public String Address2 = null;
        public String Urbanization = null;
        public String City = null;
        public String State = null;
        public String PostalCode = null;
        public String CountryCode = null;
        public String Last4 = null;
        public Short CcExpMonth = null;
        public Short CcExpYear = null;
        public Boolean IsTemp = null;
        public Boolean IsDisabled = null;
        public Date OnHoldUtc = null;
        public Short OnHoldReasonCode = null;
        public String OnHoldReasonDetail = null;
        public Date AcctUpdaterFlagUtc = null;
        public Integer CreatedBy = null;
        public Date CreatedUtc = null;
        public Integer ModifiedBy = null;
        public Date ModifiedUtc = null;
        public Boolean AcctUpdaterFlag = null;
        public Short EntryModeId = null;
        public Boolean ExcludeFromAcctUpdater = null;
        
        public Integer getPaymentProfileId() { return PaymentProfileId; }
        public PaymentProfile setPaymentProfileId(Integer value) { this.PaymentProfileId = value; return this; }
        public String getAcctToken() { return AcctToken; }
        public PaymentProfile setAcctToken(String value) { this.AcctToken = value; return this; }
        public Integer getOwnerId() { return OwnerId; }
        public PaymentProfile setOwnerId(Integer value) { this.OwnerId = value; return this; }
        public Short getOwnerTypeId() { return OwnerTypeId; }
        public PaymentProfile setOwnerTypeId(Short value) { this.OwnerTypeId = value; return this; }
        public Short getAcctTypeId() { return AcctTypeId; }
        public PaymentProfile setAcctTypeId(Short value) { this.AcctTypeId = value; return this; }
        public Short getAcctClassId() { return AcctClassId; }
        public PaymentProfile setAcctClassId(Short value) { this.AcctClassId = value; return this; }
        public String getPrefixName() { return PrefixName; }
        public PaymentProfile setPrefixName(String value) { this.PrefixName = value; return this; }
        public String getFirstName() { return FirstName; }
        public PaymentProfile setFirstName(String value) { this.FirstName = value; return this; }
        public String getMiddleName() { return MiddleName; }
        public PaymentProfile setMiddleName(String value) { this.MiddleName = value; return this; }
        public String getLastName() { return LastName; }
        public PaymentProfile setLastName(String value) { this.LastName = value; return this; }
        public String getSuffixName() { return SuffixName; }
        public PaymentProfile setSuffixName(String value) { this.SuffixName = value; return this; }
        public String getAddress1() { return Address1; }
        public PaymentProfile setAddress1(String value) { this.Address1 = value; return this; }
        public String getAddress2() { return Address2; }
        public PaymentProfile setAddress2(String value) { this.Address2 = value; return this; }
        public String getUrbanization() { return Urbanization; }
        public PaymentProfile setUrbanization(String value) { this.Urbanization = value; return this; }
        public String getCity() { return City; }
        public PaymentProfile setCity(String value) { this.City = value; return this; }
        public String getState() { return State; }
        public PaymentProfile setState(String value) { this.State = value; return this; }
        public String getPostalCode() { return PostalCode; }
        public PaymentProfile setPostalCode(String value) { this.PostalCode = value; return this; }
        public String getCountryCode() { return CountryCode; }
        public PaymentProfile setCountryCode(String value) { this.CountryCode = value; return this; }
        public String getLast4() { return Last4; }
        public PaymentProfile setLast4(String value) { this.Last4 = value; return this; }
        public Short getCcExpMonth() { return CcExpMonth; }
        public PaymentProfile setCcExpMonth(Short value) { this.CcExpMonth = value; return this; }
        public Short getCcExpYear() { return CcExpYear; }
        public PaymentProfile setCcExpYear(Short value) { this.CcExpYear = value; return this; }
        public Boolean getIsTemp() { return IsTemp; }
        public PaymentProfile setIsTemp(Boolean value) { this.IsTemp = value; return this; }
        public Boolean getIsDisabled() { return IsDisabled; }
        public PaymentProfile setIsDisabled(Boolean value) { this.IsDisabled = value; return this; }
        public Date getOnHoldUtc() { return OnHoldUtc; }
        public PaymentProfile setOnHoldUtc(Date value) { this.OnHoldUtc = value; return this; }
        public Short getOnHoldReasonCode() { return OnHoldReasonCode; }
        public PaymentProfile setOnHoldReasonCode(Short value) { this.OnHoldReasonCode = value; return this; }
        public String getOnHoldReasonDetail() { return OnHoldReasonDetail; }
        public PaymentProfile setOnHoldReasonDetail(String value) { this.OnHoldReasonDetail = value; return this; }
        public Date getAcctUpdaterFlagUtc() { return AcctUpdaterFlagUtc; }
        public PaymentProfile setAcctUpdaterFlagUtc(Date value) { this.AcctUpdaterFlagUtc = value; return this; }
        public Integer getCreatedBy() { return CreatedBy; }
        public PaymentProfile setCreatedBy(Integer value) { this.CreatedBy = value; return this; }
        public Date getCreatedUtc() { return CreatedUtc; }
        public PaymentProfile setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
        public Integer getModifiedBy() { return ModifiedBy; }
        public PaymentProfile setModifiedBy(Integer value) { this.ModifiedBy = value; return this; }
        public Date getModifiedUtc() { return ModifiedUtc; }
        public PaymentProfile setModifiedUtc(Date value) { this.ModifiedUtc = value; return this; }
        public Boolean isAcctUpdaterFlag() { return AcctUpdaterFlag; }
        public PaymentProfile setAcctUpdaterFlag(Boolean value) { this.AcctUpdaterFlag = value; return this; }
        public Short getEntryModeId() { return EntryModeId; }
        public PaymentProfile setEntryModeId(Short value) { this.EntryModeId = value; return this; }
        public Boolean isExcludeFromAcctUpdater() { return ExcludeFromAcctUpdater; }
        public PaymentProfile setExcludeFromAcctUpdater(Boolean value) { this.ExcludeFromAcctUpdater = value; return this; }
    }

}

Java PaymentProfileImportEndpoint DTOs

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/paymentprofile/import HTTP/1.1 
Host: clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PaymentProfileImportEndpoint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales">
  <AcctToken xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Payments">String</AcctToken>
  <DoNotUpdatePaymentTypePreference xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Payments">false</DoNotUpdatePaymentTypePreference>
  <NewOwner xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Payments">
    <d2p1:Item1>0</d2p1:Item1>
    <d2p1:Item2>Unknown</d2p1:Item2>
  </NewOwner>
  <ProfileToken xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Payments">String</ProfileToken>
  <ApiKey>String</ApiKey>
  <NewOwnerId>0</NewOwnerId>
</PaymentProfileImportEndpoint>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaymentProfileImportResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Payments">
  <Message>String</Message>
  <PaymentProfile xmlns:d2p1="http://schemas.datacontract.org/2004/07/ClubReady.Payments.PaymentsDb">
    <d2p1:AcctClassId>0</d2p1:AcctClassId>
    <d2p1:AcctToken>String</d2p1:AcctToken>
    <d2p1:AcctTypeId>0</d2p1:AcctTypeId>
    <d2p1:AcctUpdaterFlag>false</d2p1:AcctUpdaterFlag>
    <d2p1:AcctUpdaterFlagUtc>0001-01-01T00:00:00</d2p1:AcctUpdaterFlagUtc>
    <d2p1:Address1>String</d2p1:Address1>
    <d2p1:Address2>String</d2p1:Address2>
    <d2p1:CcExpMonth>0</d2p1:CcExpMonth>
    <d2p1:CcExpYear>0</d2p1:CcExpYear>
    <d2p1:City>String</d2p1:City>
    <d2p1:CountryCode>String</d2p1:CountryCode>
    <d2p1:CreatedBy>0</d2p1:CreatedBy>
    <d2p1:CreatedUtc>0001-01-01T00:00:00</d2p1:CreatedUtc>
    <d2p1:EntryModeId>0</d2p1:EntryModeId>
    <d2p1:ExcludeFromAcctUpdater>false</d2p1:ExcludeFromAcctUpdater>
    <d2p1:FirstName>String</d2p1:FirstName>
    <d2p1:IsDisabled>false</d2p1:IsDisabled>
    <d2p1:IsTemp>false</d2p1:IsTemp>
    <d2p1:Last4>String</d2p1:Last4>
    <d2p1:LastName>String</d2p1:LastName>
    <d2p1:MiddleName>String</d2p1:MiddleName>
    <d2p1:ModifiedBy>0</d2p1:ModifiedBy>
    <d2p1:ModifiedUtc>0001-01-01T00:00:00</d2p1:ModifiedUtc>
    <d2p1:OnHoldReasonCode>0</d2p1:OnHoldReasonCode>
    <d2p1:OnHoldReasonDetail>String</d2p1:OnHoldReasonDetail>
    <d2p1:OnHoldUtc>0001-01-01T00:00:00</d2p1:OnHoldUtc>
    <d2p1:OwnerId>0</d2p1:OwnerId>
    <d2p1:OwnerTypeId>0</d2p1:OwnerTypeId>
    <d2p1:PaymentProfileId>0</d2p1:PaymentProfileId>
    <d2p1:PostalCode>String</d2p1:PostalCode>
    <d2p1:PrefixName>String</d2p1:PrefixName>
    <d2p1:State>String</d2p1:State>
    <d2p1:SuffixName>String</d2p1:SuffixName>
    <d2p1:Urbanization>String</d2p1:Urbanization>
  </PaymentProfile>
  <Success>false</Success>
</PaymentProfileImportResponse>