Rsl.Lotteries

<back to all web services

GetCustomerSubscriptions

Get all subscriptions for a customer

The following routes are available for this service:
GET/customers/{CustomerId}/subscriptions
GetCustomerSubscriptions Parameters:
NameParameterData TypeRequiredDescription
CustomerIdpathstringYesThe customer identifier
IncludeFundingSourcesqueryboolNoWhen true, the customer subscriptions funding sources are also returned. Default is false.
IncludesubscriptionSuspensionsqueryboolNoWhen true, the customer subscription suspensions are also returned. Default is false.
QueryBase Parameters:
NameParameterData TypeRequiredDescription
Skipformint?No
Takeformint?No
OrderByformstringNo
OrderByDescformstringNo
IncludeformstringNo
FieldsformstringNo
MetaformDictionary<string, string>No
Subscription Parameters:
NameParameterData TypeRequiredDescription
SubscriptionIdformstringNo
CustomerIdformstringNo
StartFromArtUnionIdformstringNo
PaymentMethodformPaymentMethodTypeNo
FundingSourceIdformstringNo
PlanformstringNo
GameTypeformstringNo
StartDateformDateTimeNo
EndDateformDateTime?No
SubscriptionSuspensionformIEnumerable<SubscriptionSuspension>No
StatusformSubscriptionStatusNo
SubscribedDateformDateTimeNo
CreditCardformCreditCardNo
GooglePayAccountformGooglePayAccountNo
ApplePayAccountformApplePayAccountNo
PayPalformPayPalAccountNo
ReasonCodeformstringNo
PaymentMethodType Enum:
Cash
Cheque
MoneyOrder
CreditCard
PayPal
DirectDebit
Wallet
GooglePay
ApplePay
SubscriptionSuspension Parameters:
NameParameterData TypeRequiredDescription
SubscriptionIdformstringNo
StartDateformDateTimeNo
EndDateformDateTime?No
ReasonCodeformstringNo
SubscriptionStatus Enum:
Pending
Active
Suspended
Cancelled
CreditCard Parameters:
NameParameterData TypeRequiredDescription
CreditCardIdformstringNo
CardTokenformstringNo
TokenformstringNo
CardholderNameformstringNo
CardTypeformCreditCardTypeNo
UniqueNumberIdentifierformstringNo
ExpirationMonthformstringNo
ExpirationYearformstringNo
BinformstringNo
LastFourformstringNoThe last 4 digits of the credit card number
IsDefaultformboolNo
DisabledformboolNo
LastModifiedformDateTimeNo
CreditCardType Enum:
Unknown
AmericanExpress
CarteBlanche
ChinaUnionPay
DinersClub
Discover
JCB
Laser
Maestro
MasterCard
Solo
Switch
Visa
GooglePayAccount Parameters:
NameParameterData TypeRequiredDescription
UniqueCardIdformstringNo
SourceCardTypeformstringNo
CustomerIdformstringNo
ExpirationMonthformstringNo
ExpirationYearformstringNo
BinformstringNoThe first 6 digits of the credit card, known as the Bank Identification Number.
GoogleTransactionIdformstringNoThe last 4 digits of the credit card number
SourceCardLast4formstringNo
CardholderNameformstringNo
CreatedAtformDateTimeNoThe date/time the payment method was created
TokenformstringNoThe payment method token
DisabledformboolNo
IsDefaultformboolNo
ApplePayAccount Parameters:
NameParameterData TypeRequiredDescription
UniqueCardIdformstringNo
CardTypeformstringNo
CustomerIdformstringNo
ExpirationMonthformstringNo
ExpirationYearformstringNo
BinformstringNoThe first 6 digits of the credit card, known as the Bank Identification Number.
LastFourformstringNoThe last 4 digits of the credit card number
CardholderNameformstringNo
CreatedAtformDateTimeNoThe date/time the payment method was created
TokenformstringNo
IsDefaultformboolNo
DisabledformboolNo
PayPalAccount Parameters:
NameParameterData TypeRequiredDescription
PayPalAccountIdformstringNoThe unique identifier of the PayPal acount in Dynamics
TokenformstringNoThe payment method token
EmailformstringNoThe email address belonging to the Paypal account
BillingAgreementIdformstringNoThe unique identifier of the vaulted payment flow agreement between the customer's PayPal account and RSL PayPal business account
CreatedAtformDateTimeNoThe date/time the payment method was created
IsDefaultformboolNo
DisabledformboolNo
IsNewCustomerPayPalFeeformbool?NoWhether to apply a different fee for customer coming from PayPal
QueryResponse<T> Parameters:
NameParameterData TypeRequiredDescription
OffsetformintNo
TotalformintNo
ResultsformList<T>No
MetaformDictionary<string, string>No
ResponseStatusformResponseStatusNo

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

HTTP + JSV

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

GET /customers/{CustomerId}/subscriptions HTTP/1.1 
Host: azs-stg-lotteries-web.azurewebsites.net 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	offset: 0,
	total: 0,
	results: 
	[
		{
			subscriptionId: String,
			customerId: String,
			startFromArtUnionId: String,
			paymentMethod: Cash,
			fundingSourceId: String,
			plan: String,
			gameType: String,
			startDate: 0001-01-01,
			endDate: 0001-01-01,
			status: Pending,
			subscribedDate: 0001-01-01,
			creditCard: 
			{
				creditCardId: String,
				cardToken: String,
				token: String,
				cardholderName: String,
				cardType: Unknown,
				uniqueNumberIdentifier: String,
				expirationMonth: String,
				expirationYear: String,
				bin: String,
				lastFour: String,
				isDefault: False,
				disabled: False,
				lastModified: 0001-01-01
			},
			googlePayAccount: 
			{
				uniqueCardId: String,
				sourceCardType: String,
				customerId: String,
				expirationMonth: String,
				expirationYear: String,
				bin: String,
				googleTransactionId: String,
				sourceCardLast4: String,
				cardholderName: String,
				createdAt: 0001-01-01,
				token: String,
				disabled: False,
				isDefault: False
			},
			applePayAccount: 
			{
				uniqueCardId: String,
				cardType: String,
				customerId: String,
				expirationMonth: String,
				expirationYear: String,
				bin: String,
				lastFour: String,
				cardholderName: String,
				createdAt: 0001-01-01,
				token: String,
				isDefault: False,
				disabled: False
			},
			payPal: 
			{
				payPalAccountId: String,
				token: String,
				email: String,
				billingAgreementId: String,
				createdAt: 0001-01-01,
				isDefault: False,
				disabled: False,
				isNewCustomerPayPalFee: False
			},
			reasonCode: String
		}
	],
	meta: 
	{
		String: String
	},
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}