TBS Apps API

<back to all web services

BraintreeGenerateClientTokenRequest

Requires Authentication
The following routes are available for this service:
GET/BraintreeGenerateClientTokenGenerate client token and fetch card details for payment.Generate client token and fetch list of credit cards for performing payment using braintree gateway
BraintreeGenerateClientTokenResponse Parameters:
NameParameterData TypeRequiredDescription
DataformBraintreeClientTokenNo
ResponseDataBaseExt Parameters:
NameParameterData TypeRequiredDescription
ErrorNoformintNo
MessageformstringNo
Identityformlong?No
ErrorSourceformstringNo
DisplayOnUIformboolNo
BraintreeClientToken Parameters:
NameParameterData TypeRequiredDescription
ClientTokenformstringNo
CreditCardListformList<BraintreeCreditCard>No
BraintreeCreditCard Parameters:
NameParameterData TypeRequiredDescription
CardTypeformstringNo
IsExpiedformbool?No
IsDefaultformbool?No
ExpiryMonthformstringNo
ExpiryYearformstringNo
Last4DigitsformstringNo
IssuingBankformstringNo
PaymentMethodTokenformstringNo
CardholderNameformstringNo
BinformstringNo
MaskedNumberformstringNo

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 /BraintreeGenerateClientToken HTTP/1.1 
Host: tstextweb20.np.bluebet.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Data: 
	{
		ClientToken: String,
		CreditCardList: 
		[
			{
				CardType: String,
				IsExpied: False,
				IsDefault: False,
				ExpiryMonth: String,
				ExpiryYear: String,
				Last4Digits: String,
				IssuingBank: String,
				PaymentMethodToken: String,
				CardholderName: String,
				Bin: String,
				MaskedNumber: String
			}
		]
	},
	ErrorNo: 0,
	Message: String,
	Identity: 0,
	ErrorSource: String,
	DisplayOnUI: False
}