Skip to content

Instantly share code, notes, and snippets.

@gobengo
Created August 18, 2022 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gobengo/f456b5380b25afe1d7db576ff5ac5823 to your computer and use it in GitHub Desktop.
Save gobengo/f456b5380b25afe1d7db576ff5ac5823 to your computer and use it in GitHub Desktop.
openapi: 3.0.3
info:
title: Account Payment API
version: "0"
servers:
- url: https://staging.web3.storage/api
tags:
- name: payment
description: Pay for things
paths:
/account/payment:
get:
tags:
- payment
summary: get payment settings
operationId: getPayment
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentSettings'
put:
summary: Update payment settings for an account
tags:
- payment
operationId: updateAccountPayment
requestBody:
$ref: '#/components/requestBodies/PaymentSettingsUpdate'
responses:
'202':
description: Successful operation
components:
examples:
stripePaymentMethodId:
value: pm_1LYC6JIfErzTm2rEeZ44St7k
schemas:
PaymentSettings:
type: object
properties:
method:
type: object
properties:
id:
type: string
example:
$ref: '#/components/examples/stripePaymentMethodId/value'
requestBodies:
PaymentSettingsUpdate:
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentSettings'
required: true
description: New Payment Settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment