Stabledrop Prepare API

The Prepare API from Stabledrop — 1 operation(s) for prepare.

GitHub OpenAPI

Operations 1

POST /prepare How to fund a payment contract, and how to create it once paid — before anybody… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stabledrop-me:stabledrop-me-prepare-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stabledrop-me-prepare-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stabledrop Me Prepare API
  version: 0.1.0
  termsOfService: https://stabledrop.me/terms-of-service/
  description: 'Operations tagged Prepare across 2 of this provider''s published API definitions: openapi.json, stabledrop-me-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Prepare
paths:
  /prepare:
    post:
      summary: How to fund a payment contract, and how to create it once paid — before anybody…
      description: 'Resolves email parties to wallets, screens them, derives the payment address and puts it

        on file. A successful answer has two parts:


        **1. How to fund the payment contract**

        - `escrow_address` — where the money goes. The payment contract is not deployed yet; it is created

        around the money by step 2.

        - `seller_receives_estimate` / `platform_fee_estimate` — what the seller will net.

        - `fund_by_transfer` — send `send` to `to` from any wallet or exchange; `payment_uri` is the

        same as an EIP-681 link for a QR.

        - `fund_by_signature` — when `payer` was given: an EIP-3009 authorization for them to sign,

        so they pay holding no gas.

        - `share_with_payer.pay_link` — opens this exact payment on the site, for whoever is being

        asked to pay. `share_with_payer.emailed` says whether we emailed it to the buyer: only when

        the call carries the signed-in **seller''s** credentials and the buyer was given as an

        email. Otherwise send it (or a QR of it) yourself; `emailed.reason` says why we did not.


        **2. How to create the payment contract once it is paid**

        - `settle.request` — the exact request: `POST /api/ap2/settle` on this same host, with

        `settle.request.body` unchanged (add `eip3009` on the signature route). It deploys and

        activates the payment contract and returns the signed receipt.

        - Sent before the money arrives, it answers 400 with what the address holds against what it

        needs, and spends nothing — send it again once the money lands.

        - If nobody sends it, the sweep activates a funded payment contract within about 30 minutes.


        The same function as the MCP tool `prepare_escrow_payment`, so the two never disagree.'
      operationId: prepare_prepare_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareBody'
        required: true
      responses:
        '200':
          description: '**How to fund the payment contract** (`escrow_address`, `fund_by_transfer`, `fund_by_signature`, `share_with_payer.pay_link`) and **how to create it once paid** (`settle`: the exact `POST /api/ap2/settle` request to send).'
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Prepare Prepare Post
              example:
                escrow_address: '0x34F4697416f10D47808AC9883F9374547f7c4BAd'
                external_id: mcp-4376b7e2-caba-471c-96a2-5b09afa6e74f
                description: Logo design
                chain_id: 8453
                token_address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                token_symbol: USDC
                amount_to_fund: 1000000
                seller_receives_estimate: 0.700000 USDC
                platform_fee_estimate: 0.300000 USDC
                share_with_payer:
                  pay_link: https://stabledrop.me/pay?resume=eyJzZWxsZXIiOiIweDMy…
                  qr: call payment_qr with this pay_link to show a scannable code for it
                  notify_buyer: We have NOT told the buyer about this payment. If someone else is paying, send them the pay_link (or the QR)…
                  emailed:
                    sent: false
                    reason: 'not signed in: send the pay_link yourself'
                fund_by_transfer:
                  send: 1.000000 USDC
                  send_base_units: 1000000
                  to: '0x34F4697416f10D47808AC9883F9374547f7c4BAd'
                  payment_uri: ethereum:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913@8453/transfer?address=0x34F4697416f10D47808AC9883F9374547f7c4BAd&uint256=1000000
                  then: send the `settle` request below, unchanged, once the money has arrived.
                fund_by_signature: 'Not offered: no payer was named. Pass `payer` to get an authorization for them to sign, which lets them pay holding no gas at all.'
                dispute:
                  possible: true
                  who: '0xE91A3875e8049dcC25BBEa793e41B44C0038398D'
                  where: https://stabledrop.me/dashboard
                  until: '2026-10-08T08:56:57Z'
                settle:
                  when: After the money has arrived at escrow_address — by transfer, QR, card or exchange — or, on the signature route, once the payer has signed.
                  request:
                    method: POST
                    path: /api/ap2/settle
                    host: the same API host you called /prepare on
                    body:
                      seller: '0x32Ecf447618107F3Bf7aD58a374CdAdAEFaCE0e2'
                      token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      amount: 1000000
                      expiry_timestamp: 1791449817
                      external_id: mcp-4376b7e2-caba-471c-96a2-5b09afa6e74f
                      description: Logo design
                      buyer_claims:
                        stabledrop.nominal_buyer_account: eip155:8453:0xE91A3875e8049dcC25BBEa793e41B44C0038398D
                  mcp_tool: settle_escrow_payment, with the same terms
                  if_not_funded_yet: 400, stating what the address holds against what it needs. Nothing is spent; send it again once the money lands.
                  if_nobody_calls_it: The payment contract is on file, so the sweep activates it once funded, within about 30 minutes. Calling settle is how you get the receipt now rather than later.
                next: Nothing has happened yet and nothing has been spent. Choose a funding route above, then send the `settle` request (POST /api/ap2/settle, or the settle_escrow_payment tool).
                caller:
                  authenticated: false
                terms:
                  notice: Using this API constitutes acceptance of the Stabledrop Terms of Service.
                  url: https://stabledrop.me/terms-of-service/
        '400':
          description: Something about the terms, which will never work. Do not retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: No session, API access key or merchant API key; or one that is unknown, expired, revoked, or made for terms that have since changed. `detail.error` is `api_access_required`, `detail.reason` says which (`missing`, `invalid`, `terms_changed`, `terms_not_accepted`), `detail.access_url` is where to get a key, and `detail.docs_url` is this reference's section on sending one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: A service we depend on could not be reached. Retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - Bearer: []
      - Session cookie: []
      tags:
      - Prepare
components:
  schemas:
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: What was wrong, in terms a machine can branch on.
      type: object
      required:
      - detail
      title: ErrorResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PrepareBody:
      properties:
        seller:
          type: string
          title: Seller
          description: 'Who is paid: a wallet address, or an email (resolved to that person''s wallet).'
        amount:
          type: integer
          title: Amount
          description: In the TOKEN's base units (1 USDC = 1000000). One of the terms the address derives from.
        expiry_timestamp:
          type: integer
          title: Expiry Timestamp
          description: 'Unix time the dispute window closes. 0 settles instantly with no recourse. Required: say which.'
        nominal_buyer:
          type: string
          title: Nominal Buyer
          description: 'Who may dispute and receives any refund: a wallet, or an email (resolved to that person''s wallet). Fixed now, whoever later pays.'
        external_id:
          anyOf:
          - type: string
          - type: 'null'
          title: External Id
          description: Keeps otherwise-identical payment contracts apart. Omit for a fresh one; pass back the one returned.
        payer:
          anyOf:
          - type: string
          - type: 'null'
          title: Payer
          description: The wallet that will sign, when paying by signature. Omit for a request someone else will pay.
        token_symbol:
          type: string
          title: Token Symbol
          description: A configured token, e.g. USDC.
          default: USDC
        description:
          type: string
          title: Description
          description: What the payment is for, 1 to 160 characters, in the buyer's words.
        brand:
          anyOf:
          - type: string
          - type: 'null'
          title: Brand
          description: White-label partner id (`?b=`). Attribution only.
        product_name:
          anyOf:
          - type: string
            maxLength: 160
          - type: 'null'
          title: Product Name
          description: What is being bought, shown on both dashboards. Display only.
        arbiter:
          anyOf:
          - type: string
          - type: 'null'
          title: Arbiter
          description: 'Who decides a dispute: a wallet. Omit for the default arbiter. A term, so pass the same value to /settle.'
      type: object
      required:
      - seller
      - amount
      - expiry_timestamp
      - nominal_buyer
      - description
      title: PrepareBody
      description: 'What a payment, or a request for one, would be: everything /settle needs except the money.'
  securitySchemes:
    Bearer:
      type: http
      description: An API access key (`sd_access_…`, from the site's /myAPIAccessCode page), a merchant API key (`sd_live_…`, created on the site under API keys), or a signed-in user's session token.
      scheme: bearer
    Session_cookie:
      type: apiKey
      description: A signed-in user's session, as the site's browser sends it.
      in: cookie
      name: AUTH-TOKEN
x-refined-from:
- openapi.json
- stabledrop-me-openapi.json