| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /GiftCard/Purchase |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel
Imports BorgunRPGData
Namespace Global
Namespace BorgunRPGData
Public Partial Class Borgun3DFinal3DSecureInfo
Public Overridable Property DataType As String
Public Overridable Property MpiToken As String
End Class
Public Partial Class Borgun3DFinalPaymentMethodInfo
Public Overridable Property PaymentType As String
Public Overridable Property Token As String
Public Overridable Property VirtualNumber As String
Public Overridable Property ExpYear As String
Public Overridable Property ExpMonth As String
Public Overridable Property PanLastFour As String
End Class
Public Partial Class Borgun3DFinalRequest
Public Overridable Property TransactionType As String
Public Overridable Property Amount As Integer
Public Overridable Property Currency As String
Public Overridable Property TransactionDate As Nullable(Of Date)
Public Overridable Property OrderId As String
Public Overridable Property PaymentMethod As Borgun3DFinalPaymentMethodInfo
Public Overridable Property ThreeDSecure As Borgun3DFinal3DSecureInfo
End Class
Public Partial Class BorgunApplePayFinalInfo
Public Overridable Property OrderId As String
Public Overridable Property ThreeDSecure As BorgunApplePayThreeDSecureInfo
End Class
Public Partial Class BorgunApplePayThreeDSecureInfo
Public Overridable Property DataType As String
Public Overridable Property SecurityLevelInd As String
Public Overridable Property CAVV As String
Public Overridable Property UCAF As String
End Class
End Namespace
Namespace TicketUserServices.ServiceModel
Public Partial Class GiftCardIssueResult
Public Overridable Property Success As Boolean
Public Overridable Property GiftCardId As Nullable(Of Integer)
Public Overridable Property Code As String
Public Overridable Property CodeLast4 As String
Public Overridable Property Status As String
Public Overridable Property ExpiresAt As Nullable(Of Date)
Public Overridable Property PaymentId As String
Public Overridable Property StatusCode As Integer
Public Overridable Property Message As String
End Class
Public Partial Class GiftCardPurchaseRequest
Public Overridable Property GiftCardTypeId As Integer
Public Overridable Property AmountMinor As Integer
Public Overridable Property PurchasePaymentReference As String
Public Overridable Property PurchaseOwnerId As Nullable(Of Integer)
Public Overridable Property BuyerName As String
Public Overridable Property BuyerPhone As String
Public Overridable Property BuyerEmail As String
Public Overridable Property RecipientName As String
Public Overridable Property IdempotencyKey As String
Public Overridable Property PaymentMethodId As String
Public Overridable Property PaymentId As String
Public Overridable Property CardInfo As PaymentRequestCreditCard
Public Overridable Property Borgun3DFinalInfo As Borgun3DFinalRequest
Public Overridable Property ApplePayInfo As BorgunApplePayFinalInfo
End Class
Public Partial Class PaymentMethodCreditCardInfo
Public Overridable Property PaymentType As String
Public Overridable Property Token As String
Public Overridable Property PAN As String
Public Overridable Property ExpYear As String
Public Overridable Property ExpMonth As String
Public Overridable Property CVC As String
End Class
Public Partial Class PaymentRequestCreditCard
Public Overridable Property PaymentMethod As PaymentMethodCreditCardInfo
Public Overridable Property Amount As Decimal
Public Overridable Property Currency As String
Public Overridable Property OrderId As String
Public Overridable Property TransActionDate As Date
Public Overridable Property SaveCardToToken As Boolean
End Class
End Namespace
End Namespace
VB.NET GiftCardPurchaseRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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-01T00:00:00.0000000","saveCardToToken":false},"borgun3DFinalInfo":{"transactionType":"String","amount":0,"currency":"String","transactionDate":"0001-01-01T00:00:00.0000000","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/csv
Content-Length: length
{"success":false,"giftCardId":0,"code":"String","codeLast4":"String","status":"String","expiresAt":"0001-01-01T00:00:00.0000000","paymentId":"String","statusCode":0,"message":"String"}