Create a price-locked USDC invoice for one or more gift cards, eSIMs, or mobile top-ups
Create a price-locked USDC invoice for one or more gift cards, eSIMs, or mobile top-ups.
2000 (raw units)
price
40
calls / 30d
4
unique payers
2026-09-12
updated
Provider
api.bitrefill.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x480CD46E6faDe651a0437DeaddA53D5c8e7D846A",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "2000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:42161",
"payTo": "0x480CD46E6faDe651a0437DeaddA53D5c8e7D846A",
"asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"amount": "2000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:137",
"payTo": "0x480CD46E6faDe651a0437DeaddA53D5c8e7D846A",
"asset": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"amount": "2000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "5yASLjtNssGXDv6bR9e71WXKxRymDiUzbgkGPqkQNgRn",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "2000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"items": [
{
"package_value": "25",
"product_id": "amazon-us"
}
]
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"expires_in_minutes": 15,
"invoice_id": "c2b27180-610e-4132-af77-ad42fc0ac444",
"networks": [
"eip155:8453",
"solana:mainnet"
],
"next_step": {
"body": {
"invoice_id": "c2b27180-610e-4132-af77-ad42fc0ac444"
},
"url": "/x402/invoice/pay"
},
"price_usd": 25,
"price_usdc": "25000000"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"items": {
"items": {
"properties": {
"package_value": {
"description": "The denomination from /x402/products/detail \"package_value\" (e.g. \"25\")",
"type": "string"
},
"product_id": {
"description": "Product slug from a search result",
"type": "string"
},
"refill_input": {
"description": "Recipient identifier (phone/email/account) — required when the product's recipient_type is not \"none\"",
"type": "string"
}
},
"required": [
"product_id",
"package_value"
],
"type": "object"
},
"maxItems": 15,
"minItems": 1,
"type": "array"
}
},
"required": [
"items"
]
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"a": "bc_suil8bdj"
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
}
}Use it
curl
curl "https://api.bitrefill.com/x402/invoice/create" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://api.bitrefill.com/x402/invoice/create");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://api.bitrefill.com/x402/invoice/create")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/270.json, and this resource appears in /discovery/resources and /discovery/search.