Proxy3#

Press Release#

Robopay, Monetize APIs Through Solana

Robopay, Helps Developers easily monetize APIs through Solana

Nevada City, CA–Feb 17, 2022–Existing financial infrastructure is failing to address the API Economy. It is expensive to make API requests using USD especially when the goal is to make microtransactions. Or to make these requests API marketplaces like RapidAPI need to exist. To reduce the cost of making API requests, and increase the adoption of the API economy Robopay helps API developers use Cryptocurrency.

To monetize an existing API a developer needs to create a dashboard, if they are not interested in doing so they are stuck using centralized API repositories like RapidAPI. A user on the other hand needs to create an account for every API provider they want to use, add money to the account, then make requests. To provide an API this is a lot of overhead, and each provider has a different way of authentication.

Robopay augments existing REST APIs with crypto payments with a proxy/middleware. An API request is made with additional headers including a transaction id and the cryptocoin’s public key is used as authentication. This allows developers to build APIs with payments built in without having to build dashboards and other scaffolding. By acting as a proxy/middleware layer developers don’t have to learn anything new.

“To accelerate the API economy we need APIs to be released without a lot of overhead pertaining to dashboards, authentication, and other scaffolding while allowing the developer to have a decentralized way of running that API and get paid. Robopay allows for these APIs to be built.” says Abhi Yerra, founder of Robopay.

To use Robopay a developer runs a proxy/middleware that adds a cryptocurrency payment layer before passing on the request to the API.

“As a developer I wanted to build an API where cash flowed to me without being beholden to the existing companies. With Robopay I can setup new APIs and post them online without having to manage payment infrastructure. I can also just let Robopay host it for me,” says Josh, a backend engineer.

To learn more go to robopay.sh

FAQ#

What is Robopay?#

Robopay is a proxy to pay for APIs with Solana. Build an open source API gateway that adds crypto payments that can be self-hosted.

What cryptocurrencies are we going to use?#

The goal is to support most if not all crypto currencies, but certain ones that are for high throughput will be supported first. Currently, that is Solana.

What is the API Gateway?#

The Platform is like RapidAPI but the main difference is that it adds payments to existing APIs that don’t use OpenSwagger. It is a proxy to add payments to existing APIs without modifying them.

Reference API FAQ#

How does the server work?#

Headers#

  • X-Robopay-PublicKey

  • X-Robopay-TransactionID

  • X-Robopay-Coin

  • X-Robopay-RequestID

PaymentRequest (Database Table)#

  • request_id → autogenerated unique id

  • transaction_id

  • publickey

  • coin

  • amount

  • created_at

  • fiat

  • coin_fiat_price

  • status:

    • waiting-for-payment

    • filled

Request Middleware#

  • If X-Robopay-PublicKey is not set

    • Return with Http Status 401 Unauthorized

  • If X-Robopay-PublicKey is set

    • If X-Robopay-TransactionID is not set:

      • Return with Http Status 402 Payment Required

        • If X-Robopay-Coin is set and supported

          • Store the Request in a Database Table with waiting-for-payment

          • Generate:

            {
                "request_id": "generatedrequestid",
                "amount": "",
                "coin": ""
            }
            
            
        • else X-Robopay-Coin is not supported

          • Return HTTP Status 409 Conflict

            {
              "error": "unsupported coin",
              "supported_coins": [
                {
                   "coin": "SOL",
                   "pubkey": ""
                }
               ]
            }
            
            
    • If a X-Robopay-TransactionID is set

      • If X-Robopay-RequestID is set

        • Check Request Database Table

          • If transaction_id status is fulfilled

            • Return http status: 402 payment required

            {
               "error": "transaction_fulfilled"
               "message": "That transaction has been fulfilled"
            }
            
            
          • If transaction_id status is waiting-for-payment

            • Check signature of the transaction

              • if transaction_id is still pending

                • return http status 402 payment required

                {
                  "status": "transaction_verifying",
                  "message": "Waiting for transaction to verify on Blockchain"
                }
                
                
              • Ensure that record for request_id and transaction_id has the publickey X-Robopay-PublicKey

                • if X-Robopay-PublicKey does not match RequestTable’s publickey return http status 401

                • else if X-Robopay-PublicKey matches:

                  • if X-Robopay-TransactionID transaction amount ≥ PaymentRequest.amount