## Apply a promotion code Use this method to apply a promotion code that your customer enters. This method returns a `Promise` that resolves with an object containing the following fields: * `type`: one of either `"success"` or `"error"` * `session`: only populated when `type` is `"success"`. Contains a [Session](/js/custom_checkout/session_object) instance representing the updated state. * `error`: only populated when `type` is `"error"`. Contains an object with a string `message` field which can be displayed to your customer. - `promotionCode` (string) **required** The promotion code to apply to the Checkout Session. ### Apply a promotion code ```jsx const checkoutState = useCheckout(); if (checkoutState.type === 'success') { const {applyPromotionCode} = checkoutState.checkout; applyPromotionCode('PROMOTION_CODE'); } ```