> For the complete documentation index, see [llms.txt](https://docs.tebex.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tebex.io/developers/headless-api/guides/gift-cards/apply-gift-card.md).

# Apply Gift Card

Gift cards enable customers to reduce or fully pay for their basket's balance at checkout.&#x20;

A gift card is a sequence of 4 groups of 4 numbers each, ex. `0127 0244 7210 1111`. Each gift card is fully unique for your store.

## Apply a gift card

> Applies a creator code to a basket.

```json
{"openapi":"3.1.0","info":{"title":"Tebex Headless API","version":"2.0.0"},"tags":[{"name":"Headless","description":"Main API scoped to public token"}],"servers":[{"url":"https://headless.tebex.io/api/accounts/{token}","description":"Main API scoped to public token","variables":{"token":{"default":"","description":"The store's public token"}}}],"paths":{"/baskets/{basketIdent}/giftcards":{"post":{"tags":["Headless"],"operationId":"applyGiftCard","summary":"Apply a gift card","parameters":[{"$ref":"#/components/parameters/basketIdent"}],"description":"Applies a creator code to a basket.","requestBody":{"description":"Provide a `card_number` to apply to the basket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"responses":{"200":{"description":"Successful response returns a success message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}}}}}},"components":{"parameters":{"basketIdent":{"name":"basketIdent","in":"path","required":true,"schema":{"type":"string"},"description":"The basket identifier."}},"schemas":{"GiftCard":{"type":"object","properties":{"card_number":{"type":"string"}}}}}}
```
