| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /GiftCard/Purchase |
|---|
export class GiftCardIssueResult
{
public success?: boolean;
public giftCardId?: number;
public code?: string;
public codeLast4?: string;
public status?: string;
public expiresAt?: string;
public paymentId?: string;
public statusCode?: number;
public message?: string;
public constructor(init?: Partial<GiftCardIssueResult>) { (Object as any).assign(this, init); }
}
export class PaymentMethodCreditCardInfo
{
public paymentType?: string;
public token?: string;
public pan?: string;
public expYear?: string;
public expMonth?: string;
public cvc?: string;
public constructor(init?: Partial<PaymentMethodCreditCardInfo>) { (Object as any).assign(this, init); }
}
export class PaymentRequestCreditCard
{
public paymentMethod?: PaymentMethodCreditCardInfo;
public amount?: number;
public currency?: string;
public orderId?: string;
public transActionDate?: string;
public saveCardToToken?: boolean;
public constructor(init?: Partial<PaymentRequestCreditCard>) { (Object as any).assign(this, init); }
}
export class Borgun3DFinalPaymentMethodInfo
{
public paymentType?: string;
public token?: string;
public virtualNumber?: string;
public expYear?: string;
public expMonth?: string;
public panLastFour?: string;
public constructor(init?: Partial<Borgun3DFinalPaymentMethodInfo>) { (Object as any).assign(this, init); }
}
export class Borgun3DFinal3DSecureInfo
{
public dataType?: string;
public mpiToken?: string;
public constructor(init?: Partial<Borgun3DFinal3DSecureInfo>) { (Object as any).assign(this, init); }
}
export class Borgun3DFinalRequest
{
public transactionType?: string;
public amount?: number;
public currency?: string;
public transactionDate?: string;
public orderId?: string;
public paymentMethod?: Borgun3DFinalPaymentMethodInfo;
public threeDSecure?: Borgun3DFinal3DSecureInfo;
public constructor(init?: Partial<Borgun3DFinalRequest>) { (Object as any).assign(this, init); }
}
export class BorgunApplePayThreeDSecureInfo
{
public dataType?: string;
public securityLevelInd?: string;
public cavv?: string;
public ucaf?: string;
public constructor(init?: Partial<BorgunApplePayThreeDSecureInfo>) { (Object as any).assign(this, init); }
}
export class BorgunApplePayFinalInfo
{
public orderId?: string;
public threeDSecure?: BorgunApplePayThreeDSecureInfo;
public constructor(init?: Partial<BorgunApplePayFinalInfo>) { (Object as any).assign(this, init); }
}
export class GiftCardPurchaseRequest
{
public giftCardTypeId?: number;
public amountMinor?: number;
public purchasePaymentReference?: string;
public purchaseOwnerId?: number;
public buyerName?: string;
public buyerPhone?: string;
public buyerEmail?: string;
public recipientName?: string;
public idempotencyKey?: string;
public paymentMethodId?: string;
public paymentId?: string;
public cardInfo?: PaymentRequestCreditCard;
public borgun3DFinalInfo?: Borgun3DFinalRequest;
public applePayInfo?: BorgunApplePayFinalInfo;
public constructor(init?: Partial<GiftCardPurchaseRequest>) { (Object as any).assign(this, init); }
}
TypeScript GiftCardPurchaseRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}