DISCOUNT_CODES_READ/WRITE OAuth scopes present, but /v2/discount-codes returns NOT_FOUND

I’m building a Square OAuth integration and am trying to determine whether the Discount Codes API is available to third-party applications.

I’ve discovered that the Square Dashboard is actively using the following endpoints:

POST /v2/discount-codes/search
POST /v2/discount-codes
GET  /v2/discount-codes/{discount_code_id}/qr-codes

The Dashboard is able to create and retrieve discount codes through these endpoints. For example, creating a code produces an object like:

{
  "discount_code": {
    "id": "555555-67e3-4b66-b79a-1eb0fd9b4734",
    "code": "INTERNAL",
    "pricing_rule_id": "IQN84nfKJS94",
    "max_redemptions": -1,
    "reason": "COUPON_BUILDER",
    "pricing_rule_version": 1787031257029,
    "max_redemptions_per_customer": 1
  }
}

The QR endpoint also returns a Square coupon QR identifier:

{
  "qr_code": {
    "id": "sqcw:8fhefh9ufh9urhf2",
    "content_type": "IMAGE_PNG"
  }
}

My OAuth access token has the following scopes:

DISCOUNT_CODES_READ
DISCOUNT_CODES_WRITE

However, when I make the same requests through the public Connect API using the OAuth access token, I receive:

{
  "errors": [{
    "category": "INVALID_REQUEST_ERROR",
    "code": "NOT_FOUND",
    "detail": "API endpoint for URL path `/v2/discount-codes` and HTTP method `CreateDiscountCode` is not found."
  }]
}

I’ve tested multiple current and older Square API versions, and the result is the same.

Interestingly, the Square Dashboard’s authenticated session can successfully call the endpoint. I can also see the Dashboard making the request directly in the browser’s network inspector.

My question is:

Are DISCOUNT_CODES_READ and DISCOUNT_CODES_WRITE restricted to particular Square applications, programs, or merchant/app entitlements?

If so, what is required for a third-party OAuth application to obtain access to these endpoints?

I’m specifically trying to determine whether this is:

  1. an OAuth scope issue
  2. an application/partner entitlement
  3. a merchant eligibility restriction

Unblocking this would enable my merchant to have an omni-channel solution for discount codes and could increase in-store returns. I would appreciate any clarification from the Square developer/API team.

Hi @twoflatlabs - access to the Discount Codes API is available through special request - I’ve started the process on our side and will follow up with more details via DM.

That’s great news, looking forward to hearing from you. Thanks so much!

Hi Square Developer team,

We’re developing a Square integration and would like to request access to the Discount Codes API, including DISCOUNT_CODES_READ and DISCOUNT_CODES_WRITE.

We’ve seen previous forum posts indicating that access to /v2/discount-codes may be available by special request.

Could someone from the Square team please assist with the process for requesting access for our application?

Happy to provide our application ID and further details about our use case privately.

Thanks.

Hi @pehughes - I’ve sent you a private message.

Hi Square Developer team,

We’re building a membership and loyalty integration for breweries and taprooms, and would like to request access to the Discount Codes API, including DISCOUNT_CODES_READ and DISCOUNT_CODES_WRITE.

Our use case is member perks such as one free beer per month or a free pour on a new release. The perk needs to be redeemable only by that member, able to be saved for a later visit if they decline it today, and applied natively in Square POS so staff never leave the register.

We’ve tested the public options and neither works. CatalogPricingRule with customer_group_ids_any gives correct customer gating but always auto-applies, so there is no way to defer. Loyalty reward tiers are deferrable but LoyaltyProgramRewardTierhas no eligibility field, so any account with enough points can redeem any tier. A customer-attached discount code looks like the right mechanism for this.

Calls to /v2/discount-codes currently return NOT_FOUND for our application, and we’ve seen previous forum posts indicating access may be available by special request.

Could someone from the Square team please assist with the process for requesting access for our application?

Happy to provide our application ID and further details about our use case privately.

Thanks.

Hi @digitallysimple - the Discount Codes API has not yet been released in GA! I’ve sent you a DM for more details to get you enrolled.

Hi Jseok and Square Developer team,

I’m an engineer at Ocus, we’re developing a Square integration to tracking Ads performance for our Clients. To do this, we would need the Discount Codes API, including DISCOUNT_CODES_READ and DISCOUNT_CODES_WRITE.

For now, we are using Customer Group discount as a workaround, but that won’t work with Online Order as far as I understand.

Many thanks !

any chance I can get access to this api as well?

Hi @jseok and Square Developer Team,

Could you please help us request special access to the Discount Codes API, including DISCOUNT_CODES_READ and DISCOUNT_CODES_WRITE?

Please let us know the access requirements and how to provide application details privately. We would also appreciate documentation confirming whether API-issued codes support redemption on Square Register in Canada and whether a reward can be restricted to exactly one item unit per redemption.

Thank you!

@jseok would love to get api access here as well. Working on some creator marketing workflows and would be AMAZING to issue discount codes per creator automatically for our customers when they accept a creator.

What is the process for that look like?