# Bitrefill x402 Invoice Payment

> Bitrefill x402 Invoice Payment is a paid API for AI agents from api.bitrefill.com, paid per call via x402, $1000/call, status unknown (last checked 2026-10-12).

Pay a previously created Bitrefill invoice with USDC on-chain via the x402 payment protocol to complete purchase of gift cards, eSIMs, or mobile top-ups

## Facts

- Endpoint: POST https://api.bitrefill.com/x402/invoice/pay?utm_source=zero.xyz
- Price: $1000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitrefill-x402-invoice-pay-84f6e6da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7eUjY7udrt1zUJ8InCwZ_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bitrefill-x402-invoice-pay-84f6e6da -d '<json body>'
```

Example prompt: Pay the Bitrefill invoice c2b27180-610e-4132-af77-ad42fc0ac444 with USDC now so I can get the gift card.

## When to prefer this

Use this endpoint as the final payment step after creating an invoice via the Bitrefill x402 invoice creation endpoint. This is the only endpoint that actually executes and settles the USDC payment on-chain. Use it when you have a valid invoice_id and are ready to commit the purchase — not for browsing products, checking prices, or creating invoices.

## Known failure modes

- Invoice not found or invalid invoice_id — returns error with unknown invoice
- Invoice already paid — returns error indicating duplicate payment attempt
- Insufficient USDC balance or payment amount mismatch — payment rejected
- On-chain transaction failure or revert — network error response
- Invoice expired or price-lock lapsed — requires new invoice creation

## How this service works

Pay a Bitrefill invoice in USDC via x402 to buy gift cards, eSIMs & mobile top-ups across 180+ countries.

## Output

A JSON object confirming whether the on-chain USDC payment was successful, including the invoice_id, transaction hash, network (e.g. eip155:8453 for Base), and a status field set to 'complete' along with a success boolean.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "invoice_id": {
   "type": "string",
   "description": "Invoice id to pay via x402"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "message": "Payment accepted; poll invoice/status for fulfillment outcome and redemption codes.",
  "accepted": true,
  "next_step": {
   "url": "/x402/invoice/status?invoice_id=c2b27180-610e-4132-af77-ad42fc0ac444"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitrefill-x402-invoice-pay-84f6e6da/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.bitrefill.com](https://www.zero.xyz/host/api.bitrefill.com/llms.txt)
