# Surcharge

## GET /api/surchargeConfig

> Get Configured Surcharge Merchant data: Is Surcharge enabled, Surcharge percentage, and Surcharge StartDate

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/surchargeConfig":{"get":{"tags":["Surcharge"],"summary":"Get Configured Surcharge Merchant data: Is Surcharge enabled, Surcharge percentage, and Surcharge StartDate","description":"","parameters":[{"name":"processorGuid","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"organizationGuid","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"mKey","in":"query","schema":{"type":"string"}},{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the Configured Surcharge Merchant data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurchargeConfigResponse"}}}},"400":{"description":"If surcharge config throws exception","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}},"404":{"description":"If the surcharge config is not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"SurchargeConfigResponse":{"type":"object","properties":{"SurchargeEnabled":{"type":"boolean","description":"Is Surcharging enabled - true/false returned based on configured Merchant Surcharge."},"SurchargeRate":{"type":"string","description":"example 2.9900 in d.dddd format - configured Merchant Surcharge Percentage Rate.","nullable":true},"SurchargeStartDate":{"type":"string","description":"Surcharge Start Date based on configured Merchant Surcharge.\r\nDate Format - yyyy-MM-dd\r\nResponse Example:\r\n\"SurchargeStartDate\": \"2025-01-31\"","nullable":true}},"additionalProperties":false},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

## GET /api/surcharge

> Returns Calculated Surcharge based on Amount, Configured Surcharge Merchant percentage, and CREDIT only Card Bin

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/surcharge":{"get":{"tags":["Surcharge"],"summary":"Returns Calculated Surcharge based on Amount, Configured Surcharge Merchant percentage, and CREDIT only Card Bin","description":"","parameters":[{"name":"ProcessorGuid","in":"query","description":"required if API Partner - Identifies Processor being used by an API Partner","schema":{"type":"string"}},{"name":"OrganizationGuid","in":"query","description":"internal use - Valid Panorama Organization Guid","schema":{"type":"string"}},{"name":"MKey","in":"query","description":"internal use - Used by FrontStream only","schema":{"maxLength":500,"type":"string"}},{"name":"CardBin","in":"query","description":"optional if TokenGuid or ExternalCardToken used - Valid card bin - 1st 6 to 8 digits","schema":{"maxLength":8,"minLength":6,"type":"string"}},{"name":"TokenGuid","in":"query","description":"optional - Valid Token Guid from a Tokenized card through Payment API","schema":{"type":"string"}},{"name":"ExternalCardToken","in":"query","description":"internal use","schema":{"maxLength":200,"type":"string"}},{"name":"Amount","in":"query","description":"required - transaction amount used for surcharge calculation","required":true,"schema":{"maxLength":9,"type":"string"}},{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the calculated surcharge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurchargeResponse"}}}},"400":{"description":"If surcharge calculation throws exception","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}},"404":{"description":"If the surcharge data is not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"SurchargeResponse":{"type":"object","properties":{"Amount":{"type":"string","description":"This is the original amount submitted for Surcharge calculation.","nullable":true},"SurchargeAmount":{"type":"string","description":"This is the calculated surcharge amount based on configured Merchant Surcharge Percentage Rate and submitted amount.\r\nd.dd format","nullable":true},"SurchargeRate":{"type":"string","description":"example 2.9900 in d.dddd format - configured Merchant Surcharge Percentage Rate.","nullable":true}},"additionalProperties":false},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.frontstream.com/welcome-to-our-payment-api/api-references/test-payment-api-features/each-api-reference-specifics/surcharge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
