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

# Host to Host (H2H)

> Direct payment link integration for bank transfer payments via PCX

H2H integration returns a direct payment link that can be shared with the customer via SMS, email, or embedded in your application. The customer opens the link and completes the payment at their bank. No hosted UI redirect is required on your side.

Use H2H when you want full control over how and where the payment link is delivered — mobile apps, SMS campaigns, email flows, or any channel where a redirect is not practical.

***

## How it works

```
1. Your server calls POST /v1/payments-init/initiate with pay_by_link: true in metadata
2. PCX returns a payment_link URL
3. You deliver the link to the customer via your chosen channel (SMS, email, push, in-app)
4. The customer opens the link and completes the payment at their bank
5. PCX sends a webhook to your server confirming the payment status
```

***

## When to use H2H

| Scenario                                         | Recommended integration                       |
| ------------------------------------------------ | --------------------------------------------- |
| Mobile app with custom payment flow              | H2H                                           |
| SMS or email payment campaigns                   | H2H                                           |
| Channels where a browser redirect is impractical | H2H                                           |
| Embedded hosted payment UI                       | [iFrame Integration](/guides/iframe/overview) |

***

## Integration steps

<Steps>
  <Step title="Initiate the payment">
    Call the PCX payment initiation endpoint with `pay_by_link: true` in the metadata. PCX returns a `payment_link` URL. See [Initiating a Payment](/guides/h2h/initiating-a-payment).
  </Step>

  <Step title="Deliver the link">
    Send the `payment_link` to the customer via SMS, email, push notification, or in-app message. The link expires after 24 hours.
  </Step>

  <Step title="Receive confirmation">
    PCX sends a server-to-server webhook to your registered endpoint when the payment status changes. See [Payment Status & Webhooks](/guides/h2h/payment-status).
  </Step>
</Steps>
