> ## Documentation Index
> Fetch the complete documentation index at: https://docs.virtuous.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate Payment Processing Cost

> Returns what it costs to process a donation through a gateway.

The cost is calculated for the `amount` you pass, and includes the amount added when `donorCoverCosts` is true.

<Info>Call it before Process a Donation Payment to show a donor what covering fees would add to their gift.</Info>

<Note>The spec does not document error responses for this endpoint beyond `401`, so the causes aren't listed with the responses here. Errors still arrive in the [ProblemDetails envelope](/raise/error-handling#the-problemdetails-envelope) the rest of the Raise API uses — handle a rejected request (`400`), and a path ID that doesn't resolve (`404`), as you would on any other endpoint.</Note>


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.virtuous.org/llms.txt).
