sfgboxapi

<back to all web services

CreateSubscribeCustomer

Requires Authentication
The following routes are available for this service:
POST/create-customer
CreateSubscribeCustomer Parameters:
NameParameterData TypeRequiredDescription
EmailbodystringNo
StripeCustomer Parameters:
NameParameterData TypeRequiredDescription
AccountBalanceformintNo
BusinessVatIdformstringNo
CreatedformDateTime?No
DefaultSourceformstringNo
Delinquentformbool?No
DescriptionformstringNo
DiscountformStripeDiscountNo
EmailformstringNo
InvoicePrefixformstringNo
LivemodeformboolNo
MetadataformDictionary<string, string>No
ShippingformStripeShippingNo
SourcesformStripeCollection<StripeCard>No
SubscriptionsformStripeCollection<StripeSubscription>No
DeletedformboolNo
CurrencyformstringNo
StripeId Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
StripeObject Parameters:
NameParameterData TypeRequiredDescription
ObjectformStripeType?No
StripeType Enum:
unknown
account
card
charge
coupon
customer
discount
dispute
event
invoiceitem
invoice
line_item
plan
subscription
token
transfer
list
product
StripeDiscount Parameters:
NameParameterData TypeRequiredDescription
CustomerformstringNo
CouponformStripeCouponNo
StartformDateTime?No
EndformDateTime?No
StripeCoupon Parameters:
NameParameterData TypeRequiredDescription
AmountOffformint?No
CreatedformDateTime?No
CurrencyformstringNo
DurationformStripeCouponDurationNo
DurationInMonthsformint?No
LivemodeformboolNo
MaxRedemptionsformint?No
MetadataformDictionary<string, string>No
PercentOffformint?No
RedeemByformDateTime?No
TimesRedeemedformintNo
ValidformboolNo
StripeCouponDuration Enum:
forever
once
repeating
StripeShipping Parameters:
NameParameterData TypeRequiredDescription
AddressformStripeAddressNo
NameformstringNo
PhoneformstringNo
StripeAddress Parameters:
NameParameterData TypeRequiredDescription
CityformstringNo
CountryformstringNo
Line1formstringNo
Line2formstringNo
PostalCodeformstringNo
StateformstringNo
StripeCollection<T> Parameters:
NameParameterData TypeRequiredDescription
UrlformstringNo
TotalCountformintNo
HasMoreformbool?No
DataformList<T>No
StripeCard Parameters:
NameParameterData TypeRequiredDescription
BrandformstringNo
NumberformstringNo
Last4formstringNo
DynamicLast4formstringNo
ExpMonthformintNo
ExpYearformintNo
CvcformstringNo
NameformstringNo
AddressCityformstringNo
AddressCountryformstringNo
AddressLine1formstringNo
AddressLine2formstringNo
AddressStateformstringNo
AddressZipformstringNo
CvcCheckformStripeCvcCheck?No
AddressLine1CheckformstringNo
AddressZipCheckformstringNo
FundingformstringNo
FingerprintformstringNo
CustomerformstringNo
CountryformstringNo
StripeCvcCheck Enum:
Unknown
Pass
Fail
Unchecked
StripeSubscription Parameters:
NameParameterData TypeRequiredDescription
CurrentPeriodEndformDateTime?No
StatusformStripeSubscriptionStatusNo
PlanformStripePlanNo
CurrentPeriodStartformDateTime?No
StartformDateTime?No
TrialStartformDateTime?No
CancelAtPeriodEndformbool?No
TrialEndformDateTime?No
CanceledAtformDateTime?No
EndedAtformDateTime?No
CustomerformstringNo
QuantityformintNo
StripeSubscriptionStatus Enum:
Unknown
Trialing
Active
PastDue
Canceled
Unpaid
StripePlan Parameters:
NameParameterData TypeRequiredDescription
AmountformintNo
CreatedformDateTime?No
CurrencyformstringNo
IntervalformStripePlanIntervalNo
IntervalCountformint?No
LivemodeformboolNo
MetadataformDictionary<string, string>No
NicknameformstringNo
ProductformstringNo
TrialPeriodDaysformint?No
StripePlanInterval Enum:
month
year

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.

POST /create-customer HTTP/1.1 
Host: api.sfgtec.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	email: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	accountBalance: 0,
	businessVatId: String,
	created: 0001-01-01,
	defaultSource: String,
	delinquent: False,
	description: String,
	discount: 
	{
		customer: String,
		coupon: 
		{
			amountOff: 0,
			created: 0001-01-01,
			currency: String,
			duration: forever,
			durationInMonths: 0,
			livemode: False,
			maxRedemptions: 0,
			metadata: 
			{
				String: String
			},
			percentOff: 0,
			redeemBy: 0001-01-01,
			timesRedeemed: 0,
			valid: False,
			id: String,
			object: unknown
		},
		start: 0001-01-01,
		end: 0001-01-01,
		id: String,
		object: unknown
	},
	email: String,
	invoicePrefix: String,
	livemode: False,
	metadata: 
	{
		String: String
	},
	shipping: 
	{
		address: 
		{
			city: String,
			country: String,
			line1: String,
			line2: String,
			postalCode: String,
			state: String
		},
		name: String,
		phone: String
	},
	sources: 
	{
		url: String,
		totalCount: 0,
		hasMore: False,
		data: 
		[
			{
				brand: String,
				number: String,
				last4: String,
				dynamicLast4: String,
				expMonth: 0,
				expYear: 0,
				cvc: String,
				name: String,
				addressCity: String,
				addressCountry: String,
				addressLine1: String,
				addressLine2: String,
				addressState: String,
				addressZip: String,
				cvcCheck: Unknown,
				addressLine1Check: String,
				addressZipCheck: String,
				funding: String,
				fingerprint: String,
				customer: String,
				country: String,
				id: String,
				object: unknown
			}
		],
		id: String,
		object: unknown
	},
	subscriptions: 
	{
		url: String,
		totalCount: 0,
		hasMore: False,
		data: 
		[
			{
				currentPeriodEnd: 0001-01-01,
				status: Unknown,
				plan: 
				{
					amount: 0,
					created: 0001-01-01,
					currency: String,
					interval: month,
					intervalCount: 0,
					livemode: False,
					metadata: 
					{
						String: String
					},
					nickname: String,
					product: String,
					trialPeriodDays: 0,
					id: String,
					object: unknown
				},
				currentPeriodStart: 0001-01-01,
				start: 0001-01-01,
				trialStart: 0001-01-01,
				cancelAtPeriodEnd: False,
				trialEnd: 0001-01-01,
				canceledAt: 0001-01-01,
				endedAt: 0001-01-01,
				customer: String,
				quantity: 0,
				id: String,
				object: unknown
			}
		],
		id: String,
		object: unknown
	},
	deleted: False,
	currency: String,
	id: String,
	object: unknown
}