Unlock Protocol Purchase API

The Purchase API from Unlock Protocol — 6 operation(s) for purchase.

Operations 6

GET /purchase #
POST /v2/purchase/intent/{network}/locks/{lockAddress} #
POST /v2/purchase/setup #
GET /v2/purchase/list #
DELETE /v2/purchase/payment-methods #
POST /purchase/capture #

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/unlock-protocol-purchase-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

unlock-protocol-purchase-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Unlock Locksmith Applications Purchase API
  version: '2'
  description: Locksmith provides backend functionality for enabling ticketing, metadata storage, and notification hooks.
  license:
    name: MIT
servers:
- url: https://locksmith.unlock-protocol.com
  description: Production Server
- url: https://staging-locksmith.unlock-protocol.com
  description: Staging Server
tags:
- name: Purchase
paths:
  /purchase:
    get:
      operationId: balance
      responses:
        200:
          description: Balances for purchaser addresses on each network.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type:
                  - object
                  - 'null'
                  properties:
                    address:
                      type: string
                    name:
                      type: string
                    balance:
                      type: string
        500:
          $ref: '#/components/responses/500.InternalError'
      tags:
      - Purchase
  /v2/purchase/intent/{network}/locks/{lockAddress}:
    post:
      operationId: purchase
      security:
      - User: []
      description: Create purchase intent for stripe.
      parameters:
      - $ref: '#/components/parameters/Network'
      - $ref: '#/components/parameters/LockAddress'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
              - recipients
              - stripeTokenId
              - pricing
              type: object
              properties:
                recipients:
                  type: array
                  items:
                    type: string
                  minItems: 1
                stripeTokenId:
                  type: string
                pricing:
                  type: number
                recurring:
                  type:
                  - number
                  - 'null'
                data:
                  type: array
                  items:
                    type: string
                referrers:
                  type: array
                  items:
                    type: string
      responses:
        200:
          description: Created payment intent client secret, account, and other details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientSecret:
                    type: string
                  stripeAccount:
                    type: string
                  totalPriceInDents:
                    type: number
                  pricing:
                    type:
                    - object
                    - 'null'
                    properties:
                      keyPrice:
                        type:
                        - number
                        - 'null'
                      unlockServiceFee:
                        type:
                        - number
                        - 'null'
                      creditCardProcessing:
                        type:
                        - number
                        - 'null'
        400:
          $ref: '#/components/responses/400.Invalid'
      tags:
      - Purchase
  /v2/purchase/setup:
    post:
      operationId: setupPayment
      security:
      - User: []
      description: Setup a payment method for user.
      responses:
        200:
          description: Created setup intent client secret.
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientSecret:
                    type: string
        401:
          $ref: '#/components/responses/401.NotAuthenticated'
      tags:
      - Purchase
  /v2/purchase/list:
    get:
      operationId: listPaymentMethods
      security:
      - User: []
      description: List payment methods for user.
      responses:
        200:
          description: Stripe payment methods for user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  methods:
                    type: array
                    items:
                      $ref: '#/components/schemas/PaymentMethod'
        401:
          $ref: '#/components/responses/401.NotAuthenticated'
      tags:
      - Purchase
  /v2/purchase/payment-methods:
    delete:
      operationId: removePaymentMethods
      security:
      - User: []
      description: Remove all payment methods for a user
      responses:
        200:
          description: Successfully removed all payment methods
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        401:
          $ref: '#/components/responses/401.NotAuthenticated'
      tags:
      - Purchase
  /purchase/capture:
    post:
      operationId: capturePurchase
      security:
      - User: []
      description: Capture a purchase
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - network
              - lock
              - userAddress
              - paymentIntent
              properties:
                recipients:
                  type: array
                  items:
                    type: string
                network:
                  type: number
                lock:
                  type: string
                userAddress:
                  type: string
                paymentIntent:
                  type: string
                data:
                  type: array
                  items:
                    type: string
                referrers:
                  type: array
                  items:
                    type: string
                purchaseType:
                  type: string
                  description: whether to extend or purchase membership for the recipient.
                  enum:
                  - extend
                  - purchase
      responses:
        200:
          description: Successfully captured purchase
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionHash:
                    type: string
      tags:
      - Purchase
components:
  schemas:
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
        billing_details:
          type: object
          properties:
            address:
              type: object
              properties:
                city:
                  type: string
                  format: nullable
                country:
                  type: string
                line1:
                  type: string
                  format: nullable
                line2:
                  type: string
                  format: nullable
                postal_code:
                  type: string
                  format: nullable
                state:
                  type: string
                  format: nullable
            email:
              type: string
              format: nullable
            name:
              type: string
            phone:
              type: string
              format: nullable
        card:
          type: object
          properties:
            brand:
              type: string
            checks:
              type: object
              properties:
                address_line1_check:
                  type: string
                  format: nullable
                address_postal_code_check:
                  type: string
                  format: nullable
                cvc_check:
                  type: string
            country:
              type: string
            exp_month:
              type: number
            exp_year:
              type: number
            fingerprint:
              type: string
            funding:
              type: string
            generated_from:
              type: string
              format: nullable
            last4:
              type: string
            networks:
              type: object
              properties:
                available:
                  type: array
                  items:
                    type: string
                preferred:
                  type: string
                  format: nullable
            three_d_secure_usage:
              type: object
              properties:
                supported:
                  type: boolean
            wallet:
              type: string
              format: nullable
        created:
          type: number
        customer:
          type: string
        livemode:
          type: boolean
        metadata:
          type: object
          additionalProperties: true
        type:
          type: string
    GenericInvalidBodyError:
      type: object
      properties:
        message:
          type: string
          default: Response body schema is invalid.
        error:
          type:
          - string
          - 'null'
    GenericServerError:
      type: object
      properties:
        message:
          type: string
          default: There was an error in fullfiling the request.
  responses:
    500.InternalError:
      description: Unable to fullfil request due to internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericServerError'
    401.NotAuthenticated:
      description: User is not authenticated.
      content:
        application:
          schema:
            $ref: '#/components/schemas/GenericServerError'
    400.Invalid:
      description: Invalid input received. Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericInvalidBodyError'
  parameters:
    LockAddress:
      in: path
      name: lockAddress
      required: true
      description: Lock address.
      schema:
        type: string
    Network:
      in: path
      name: network
      required: true
      description: Network id.
      schema:
        type: integer
  securitySchemes:
    User:
      type: http
      scheme: bearer
      bearerFormat: JWT
    Application:
      type: apiKey
      name: api-key
      in: query