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.
Path parameters
Query parameters
Headers
Request body
Example request
{
"merchantId": "5eb7cf5a86d9755df3a6c593"
}Response
Successful Response
Example response
{
"id": "5eb7cf5a86d9755df3a6c593",
"customerId": "5eb7cf5a86d9755df3a6c593",
"merchantId": "5eb7cf5a86d9755df3a6c593",
"programId": "5eb7cf5a86d9755df3a6c593"
}Changes
No recorded changes to this endpoint across all 2 revisions of this API.