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

# Xerobi Payment API Introduction

> Xerobi Payment API - A developer-first REST API for a modern payment gateway

> **Note**: This API is focused on predictable semantics, idempotency, clear errors, and observability.

## Overview

The Xerobi Payment API provides a comprehensive set of endpoints for handling payments, customers, payment methods, refunds, and webhooks. All amounts are in smallest currency unit (e.g., paisa for BDT).

## Authentication

All requests require Bearer token authentication:

```
Authorization: Bearer <sk_...>
```

## Base URLs

* Sandbox: `https://sandbox.api.hixbe.com/payment`
* Production: `https://api.hixbe.com/payment`

## Versioning

API versioning is handled via the `Xerobi-Version` header. Use `2026-01-01` for the latest version.

Include this header in all API requests:

```
Xerobi-Version: 2026-01-01
```

## Key Concepts

### Payment Intents

The recommended pattern for collecting payments. Create an intent, attach a payment method, and confirm to complete the payment.

### Payment Methods

Tokenized payment instruments that can be attached to customers or used directly.

### Customers

Store customer information and associate payment methods for recurring payments.

### Refunds

Issue full or partial refunds for completed charges.

### Webhooks

Receive real-time notifications about payment events.

## Error Handling

All errors follow a consistent format with `type`, `code`, `message`, and optional `param` and `request_id` fields.

## Idempotency

Use the `Idempotency-Key` header for safe retries of POST requests.

## Getting Started

> [card] [Quickstart Guide](https://docs.xerobi.com/faq-guides/quickstart.md)
>
> Get started with your first payment integration

> [card] [Payment API FAQ](https://docs.xerobi.com/faq-guides/payment-api-faq.md)
>
> Common questions and detailed guides

> [card] [Authentication](https://docs.xerobi.com/faq-guides/authentication.md)
>
> Learn about API keys and security

> [card] [Webhooks](https://docs.xerobi.com/faq-guides/webhooks.md)
>
> Set up payment notifications


## Related topics

- [Xerobi Certification & Badge API Introduction](https://docs.xerobi.com/certify/introduction.md)
- [Xerobi SMS Gateway API Introduction](https://docs.xerobi.com/sms-api/introduction.md)
- [Payment API FAQ](https://docs.xerobi.com/faq-guides/payment-api-faq.md)
- [Xerobi Developer Documentation](https://docs.xerobi.com/index.md)
- [Xerobi Fiber API](https://docs.xerobi.com/network-api/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.