84trust / 100

Invoice Pay

by Bitrefill in Markets & finance

x402 APIPassing, checked 2 h ago

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

POST
https://api.bitrefill.com/x402/invoice/pay
Price
$1,000.00
per call in USDC
Uptime
98.0%
last 30 days
Response time
214 ms
322 ms slowest 5%
Last check
Passed
2 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://api.bitrefill.com/x402/invoice/pay

Each call costs $1,000.00 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://api.bitrefill.com/x402/invoice/pay
content-type: application/json

{
  "invoice_id": "c2b27180-610e-4132-af77-ad42fc0ac444"
}

Parameters

ParameterTypeRequiredDescription
invoice_idstringYesInvoice id to pay via x402

Example response

The provider's example. We can't check it without paying.

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

Call it from code

The curl command shows the payment challenge.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.bitrefill.com/x402/invoice/pay' \
  -H 'content-type: application/json' \
  --data-raw '{"invoice_id":"c2b27180-610e-4132-af77-ad42fc0ac444"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.bitrefill.com/x402/invoice/pay' \
  -H 'content-type: application/json' \
  --data-raw '{"invoice_id":"c2b27180-610e-4132-af77-ad42fc0ac444"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode

We don't show code that pays this service: it uses a payment scheme other than exact, which needs a different client setup.

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402182 ms$1,000.00
13 h agoPassed402175 ms$1,000.00
24 h agoPassed402203 ms$1,000.00
34 h agoPassed402161 ms$1,000.00
44 h agoPassed402176 ms$1,000.00
Show 10 older checks
2 days agoPassed402161 ms$1,000.00
3 days agoPassed402217 ms$1,000.00
3 days agoTimed out---
6 days agoTimed out---
7 days agoPassed402254 ms$1,000.00
7 days agoPassed402238 ms$1,000.00
7 days agoPassed402232 ms$1,000.00
8 days agoPassed402251 ms$1,000.00
8 days agoPassed402231 ms$1,000.00
8 days agoPassed402197 ms$1,000.00