Checking access…

Skip to main content
Version: v2
Audience: Consumers, CCG Platform Engineers

HCP Gateway & WAF Reference

When to use this page

Looking up why a specific request got blocked by the HCP Gateway's Azure WAF, and the exact remediation. For the registration/authentication walkthrough, see HCP API Gateway.

HCP Gateway & WAF: What to Watch For​

The HCP Gateway uses Azure Web Application Firewall (WAF) to protect your APIs. Some requests may be blocked if they don't follow best practices.

ScenarioImpactHow to Fix
URLs in POST body not encodedRequest blockedPercent-encode all URLs in POST bodies
GET with Transfer-Encoding headerRequest blockedNever send this header on GET
Missing Accept headerRequest blockedAlways send Accept on GET
Other WAF triggersRequest blockedSee best practices below

Common WAF Block Scenarios​

1. URLs in POST Body (Encoding Required)

Example fields:

  • config.privacypolicyurl
  • appearance.font.fontSources.cssSrc
  • appearance.merchantlogo

Remediation: Always percent-encode URLs in POST request bodies.

2. GET Requests with Transfer-Encoding Header

Including this header on GET requests will trigger the WAF and block the request.


Remediation: Never include Transfer-Encoding on GET requests.

3. Missing Accept Header

Azure WAF blocks GET requests that do not include an Accept header. This affects endpoints like:

  • /token/setup-payment-methods
  • /sessions
  • /payments/{payment_id}
  • /customers/{customer_id}/payment-methods
  • /payment-methods/search

Remediation: Always include an Accept header on GET requests.

4. Other Best Practices
  • GET or HEAD requests should not have a body
  • POST requests must have a valid JSON body
  • Avoid SQL characters in request bodies
  • Encode all URLs in request bodies