Urgent.News

What's breaking now, across thousands of outlets.

Tech

I made an API that has no signup, because the payment is the login

I wanted an agent of mine to resolve an Australian company by its ABN. That is a solved problem. There are several APIs that do it and they are cheap. The agent could not use the ones I found. The price was never the blocker. The signup was. Each of them wanted an email address, a confirmation click, a dashboard visit, a plan chosen, and a key copied out of a web page into an environment…

The author created an API that allows users to access Australian company information without requiring any signup. The payment for this service is the only requirement, as the API uses the HTTP 402 Payment Required mechanism. Users can query the API by providing an Australian Business Number (ABN) and receive a JSON response containing the company details.

The API uses the x402 protocol, which is an HTTP 402 Payment Required implementation. The author discovered that the payment process involves the client signing an EIP-3009 transferWithAuthorization for a small amount of USDC (0.01 USD) and sending it in the PAYMENT-SIGNATURE header. The server then verifies the signature, settles the transfer, and returns the settlement hash in the PAYMENT-RESPONSE header.

The API also supports two payment versions (v1 and v2) with different schemas for the price and the requirements. The author faced challenges with version compatibility and discovered that their API was automatically included in a facilitator's catalog without their knowledge. They created a discovery block to address this issue.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Python Basics: Variables, Data Types

** Introduction** Before writing any meaningful program, I had to understand the four building blocks of Python: variables, data types, input/output, and basic syntax.

  • A variable is a named container for holding a value in Python programs.
  • Variable values can be reassigned during program execution.
  • The type() function determines a variable's data type in Python.

Biometric enable in Expo apps ships when every fallback is handled

Why biometrics belong in your auth flow Passwords are the weakest link in most mobile apps. Users reuse them, forget them, and abandon sign-in screens that demand them too often.

  • Biometric authentication enhances user experience in Expo apps.
  • expo-local-authentication module checks device capabilities and enrollment status.
  • Opt-in screen required for biometric feature with secure storage of user choice.

vim.async's Addition Modernizes Neovim’s Async Architecture for Better Stability

Neovim has introduced a structured concurrency library in its Lua standard library via the vim.async namespace. This framework provides a standardized method for managing async workflows, addressing…

  • Neovim introduces vim.async library for structured concurrency in Lua standard library.
  • Tasks managed cooperatively via stackful coroutines, pausing execution for I/O operations.
  • Parent-child task relationships maintained, unhandled exceptions propagated back to parent.

More from Wednesday 9 September →