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

# IP address forwarding

> Best practices on handling the original IP address for a transaction.

Some payment service providers require the IP address of the buyer to be
sent to them for anti fraud purposes.

## Embed

By default, when using [Embed](/guides/payments/embed/options) the IP address of the buyer is
passed to the payment service automatically where needed.

## Server-to-server

When creating transactions on behalf of a buyer via a server
without the use of Embed, pass the IP address of the buyer via
the `X-Forwarded-For` header.

```sh theme={"system"}
curl --header "X-Forwarded-For: 192.168.0.2" https://api.example.gr4vy.app/...
```

<Note>Most of [the SDKs](./authentication) support passing through this header on the `POST transactions` call.</Note>

This header is automatically accepted and passed to the payment service
where needed. If the header is not provided and the service provider recommends passing the IP
address, the IP address of the request's origin is forwarded instead.

<Warning>
  Not all endpoints pass the IP address to a connector. It is recommended
  to send the IP address whenever it is available.
</Warning>
