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

# Host-to-Host (H2H) Integration

> Direct server-to-server payment processing with Caibo IPG for merchants who want full control over the payment experience.

## Overview

Host-to-Host (H2H) integration provides direct server-to-server communication between your application and Caibo IPG, giving you complete control over the payment experience. This integration method is ideal for merchants who want to handle payment processing entirely within their own systems.

## Key Features

* **Direct API Integration**: Server-to-server communication without redirects
* **Full Payment Control**: Complete control over the payment flow and user experience
* **Multiple Payment Methods**: Support for credit cards, digital wallets, UPI, and alternative payment methods
* **Real-time Processing**: Immediate payment processing and status updates
* **Custom UI/UX**: Build your own payment forms and interfaces
* **Enhanced Security**: Direct communication reduces exposure points

## Supported Payment Methods

### Credit Card Payments

* Direct credit card processing with 3D Secure support
* Tokenization for recurring payments
* Multiple currency support

### Digital Wallets

* Apple Pay integration with encrypted token processing
* Google Pay support for seamless mobile payments
* Secure token handling and validation

### Alternative Payment Methods

* UPI (Unified Payments Interface) for India market
* QR code payment generation and processing
* Bank transfer and direct debit options

## H2H Endpoints

| Payment Method | Endpoint                         | Description                  |
| -------------- | -------------------------------- | ---------------------------- |
| Credit Card    | `POST /payments/h2h/{id}`        | Process credit card payments |
| Apple Pay      | `POST /payments/h2h/48-51,56-59` | Apple Pay token processing   |
| Google Pay     | `POST /payments/h2h/44-47,52-55` | Google Pay token processing  |
| UPI            | `POST /payments/h2h/30-31`       | UPI payment processing       |
| Alternative    | `POST /payments/h2h/27,43`       | Alternative payment methods  |

## Integration Flow

### 1. Initialize Payment

Create a payment request with amount, currency, and merchant details.

### 2. Collect Payment Data

Gather payment information directly in your application:

* Credit card details
* Digital wallet tokens
* Customer information

### 3. Process Payment

Send payment data directly to Caibo H2H endpoints for processing.

### 4. Handle Response

Process the payment response and update your system accordingly.

## Security Considerations

### PCI Compliance

When handling credit card data directly, ensure your system meets PCI DSS requirements:

* Secure data transmission (HTTPS/TLS)
* Proper data encryption
* Secure storage practices
* Regular security audits

### 3D Secure Authentication

Implement 3D Secure for enhanced card transaction security:

* Challenge flow handling
* Authentication result processing
* Fallback mechanisms

### Token Security

For digital wallet payments:

* Validate payment tokens
* Verify merchant authentication
* Handle token expiration

## Error Handling

### Common Error Scenarios

* Invalid payment data
* Insufficient funds
* Card declined
* 3DS authentication failure
* Network timeouts

### Retry Logic

Implement appropriate retry mechanisms:

* Transient error handling
* Exponential backoff
* Maximum retry limits

## Testing

### Sandbox Environment

Use the sandbox environment for testing:

* Test all payment methods
* Simulate various scenarios
* Validate error handling

### Test Data

Use provided test credentials:

* Test card numbers
* Mock wallet tokens
* Simulated responses

## Environment Differences: Test vs Production

* The only difference between environments is the number of enabled H2H payment methods.
* Endpoints, request/response schemas, and error codes are identical in Test and Production.
* Method availability in Production depends on your tenant's configuration and compliance enablement.
* See the list of supported methods in the H2H Payment Methods page: `/h2h/payment-methods`.

## Next Steps

<Card title="API Reference" icon="code" href="/api-reference">
  Explore detailed H2H endpoint documentation
</Card>

<Card title="Integration Examples" icon="code-bracket" href="/examples/h2h">
  View code examples for H2H integration
</Card>

<Card title="Security Guide" icon="shield-check" href="/security/h2h">
  Learn about H2H security best practices
</Card>
