Creategiftcard
Create a new gift card in pending status with a generated card number and security code.
Validates and sets the expiration (defaults to 1 year, must not exceed 5 years), sanitizes the provided custom message to prevent XSS, generates a unique 16-digit card number and a 6-digit security code, persists the card with a zero balance and the requested initialValue, and returns the persisted card representation.
Parameters: data (CreateGiftCardRequest): Request payload containing initialValue, merchantId, optional customer fields, expiration, isPhysical, designTemplate, and customMessage.
Returns: GiftCardResponse: The newly created gift card data (status will be “pending”); the security code is stored but not returned.
Authorizations
JWT access token obtained from POST /v2/token.
Path Parameters
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Query Parameters
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Body
0.01 <= x <= 1000024^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
255255100500Response
Successful Response
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Gift card status enumeration.
pending, active, suspended, expired, voided, depleted 24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
The customer card object
Attributes: serialNumber (str): The serial number of the customer pass passTypeIdentifier (str): The pass type identifier of the customer pass url (str): The shareable URL of the customer pass
