Skip to main content

checkoutAddPromoCode Mutation

Adds a gift card or a voucher to a checkout.

Triggers the following webhook events:

  • CHECKOUT_UPDATED (async): A checkout was updated.
checkoutAddPromoCode(
checkoutId: ID
id: ID
promoCode: String!
token: UUID
): CheckoutAddPromoCode
Details
type CheckoutAddPromoCode {
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated
errors: [CheckoutError!]!
}

Arguments

id ● ID

The checkout's ID.

promoCode ● String!

Gift card code or voucher code.

Show deprecatedHide deprecated

checkoutId ● ID

DEPRECATED

Use id instead.

The ID of the checkout.

token ● UUID

DEPRECATED

Use id instead.

Checkout token.

Type

CheckoutAddPromoCode

Adds a gift card or a voucher to a checkout.

Triggers the following webhook events:

  • CHECKOUT_UPDATED (async): A checkout was updated.