Skip to content
onelayer.
All tools

Tool detail

Bitrefill

Creates a price-locked USDC invoice for one to fifteen Bitrefill gift-card, eSIM or top-up items, returning an invoice_id to pay separately.

Categories: Payments

Use when

  • create an invoice for a gift card purchase before paying
  • price-lock a multi-item Bitrefill order of up to 15 items

Not for

  • not for paying the invoice - use /x402/invoice/pay
  • not for looking up product ids/denominations - use /x402/products/detail first

Inputs

POST JSON body: { items: array[1-15] of { product_id: string (required), package_value: string (required), refill_input: string (optional, required unless recipient_type is "none") } }

Admitted input schema

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "package_value": {
            "type": "string",
            "minLength": 0,
            "maxLength": 4096,
            "description": "The denomination from /x402/products/detail \"package_value\" (e.g. \"25\")"
          },
          "product_id": {
            "type": "string",
            "minLength": 0,
            "maxLength": 4096,
            "description": "Product slug from a search result"
          },
          "refill_input": {
            "type": "string",
            "minLength": 0,
            "maxLength": 4096,
            "description": "Recipient identifier (phone/email/account) — required when the product's recipient_type is not \"none\""
          }
        },
        "required": [
          "product_id",
          "package_value"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 15
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}

Endpoint

Method
POST
URL
https://api.bitrefill.com/x402/invoice/create

Payment

Protocol
x402
Listed price
0.002 USDC per call on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
POST https://api.bitrefill.com/x402/invoice/create
Retrieved
2026-09-30T20:37:07.382Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z