TicketUserServices

<back to all web services

GiftCardPurchaseRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/GiftCard/Purchase
GiftCardPurchaseRequest Parameters:
NameParameterData TypeRequiredDescription
GiftCardTypeIdbodyintNo
AmountMinorbodyintNo
PurchasePaymentReferencebodystringNo
PurchaseOwnerIdbodyint?No
BuyerNamebodystringNo
BuyerPhonebodystringNo
BuyerEmailbodystringNo
RecipientNamebodystringNo
IdempotencyKeybodystringNo
PaymentMethodIdbodystringNo
PaymentIdbodystringNo
CardInfobodyPaymentRequestCreditCardNo
Borgun3DFinalInfobodyBorgun3DFinalRequestNo
ApplePayInfobodyBorgunApplePayFinalInfoNo
PaymentRequestCreditCard Parameters:
NameParameterData TypeRequiredDescription
PaymentMethodformPaymentMethodCreditCardInfoNo
AmountformdecimalNo
CurrencyformstringNo
OrderIdformstringNo
TransActionDateformDateTimeNo
SaveCardToTokenformboolNo
PaymentMethodCreditCardInfo Parameters:
NameParameterData TypeRequiredDescription
PaymentTypeformstringNo
TokenformstringNo
PANformstringNo
ExpYearformstringNo
ExpMonthformstringNo
CVCformstringNo
Borgun3DFinalRequest Parameters:
NameParameterData TypeRequiredDescription
TransactionTypeformstringNo
AmountformintNo
CurrencyformstringNo
TransactionDateformDateTime?No
OrderIdformstringNo
PaymentMethodformBorgun3DFinalPaymentMethodInfoNo
ThreeDSecureformBorgun3DFinal3DSecureInfoNo
Borgun3DFinalPaymentMethodInfo Parameters:
NameParameterData TypeRequiredDescription
PaymentTypeformstringNo
TokenformstringNo
VirtualNumberformstringNo
ExpYearformstringNo
ExpMonthformstringNo
PanLastFourformstringNo
Borgun3DFinal3DSecureInfo Parameters:
NameParameterData TypeRequiredDescription
DataTypeformstringNo
MpiTokenformstringNo
BorgunApplePayFinalInfo Parameters:
NameParameterData TypeRequiredDescription
OrderIdformstringNo
ThreeDSecureformBorgunApplePayThreeDSecureInfoNo
BorgunApplePayThreeDSecureInfo Parameters:
NameParameterData TypeRequiredDescription
DataTypeformstringNo
SecurityLevelIndformstringNo
CAVVformstringNo
UCAFformstringNo
GiftCardIssueResult Parameters:
NameParameterData TypeRequiredDescription
SuccessformboolNo
GiftCardIdformint?No
CodeformstringNo
CodeLast4formstringNo
StatusformstringNo
ExpiresAtformDateTime?No
PaymentIdformstringNo
StatusCodeformintNo
MessageformstringNo

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 /GiftCard/Purchase HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	giftCardTypeId: 0,
	amountMinor: 0,
	purchasePaymentReference: String,
	purchaseOwnerId: 0,
	buyerName: String,
	buyerPhone: String,
	buyerEmail: String,
	recipientName: String,
	idempotencyKey: String,
	paymentMethodId: String,
	paymentId: String,
	cardInfo: 
	{
		paymentMethod: 
		{
			paymentType: String,
			token: String,
			pan: String,
			expYear: String,
			expMonth: String,
			cvc: String
		},
		amount: 0,
		currency: String,
		orderId: String,
		transActionDate: 0001-01-01,
		saveCardToToken: False
	},
	borgun3DFinalInfo: 
	{
		transactionType: String,
		amount: 0,
		currency: String,
		transactionDate: 0001-01-01,
		orderId: String,
		paymentMethod: 
		{
			paymentType: String,
			token: String,
			virtualNumber: String,
			expYear: String,
			expMonth: String,
			panLastFour: String
		},
		threeDSecure: 
		{
			dataType: String,
			mpiToken: String
		}
	},
	applePayInfo: 
	{
		orderId: String,
		threeDSecure: 
		{
			dataType: String,
			securityLevelInd: String,
			cavv: String,
			ucaf: String
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	success: False,
	giftCardId: 0,
	code: String,
	codeLast4: String,
	status: String,
	expiresAt: 0001-01-01,
	paymentId: String,
	statusCode: 0,
	message: String
}