Created
March 7, 2019 08:31
-
-
Save yatatsu/0dd95c6fb633ea9945847687ef31126c to your computer and use it in GitHub Desktop.
[WIP] https://pay.jp/docs/api/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.0" | |
info: | |
version: 0.1.0 | |
title: PAY.JP API | |
servers: | |
- url: https://api.pay.jp/v1 | |
paths: | |
/tokens: | |
post: | |
summary: Create a token | |
operationId: createToken | |
tags: | |
- token | |
responses: | |
'200': | |
description: The token you created | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Token" | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/ErrorResponse" | |
/tokens/{token_id}: | |
get: | |
summary: Info for a specific token | |
operationId: getTokenById | |
tags: | |
- token | |
parameters: | |
- name: token_id | |
in: path | |
required: true | |
description: The id of the token to retrieve | |
schema: | |
type: string | |
responses: | |
'200': | |
description: Expected response to a valid request | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Token" | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/ErrorResponse" | |
components: | |
schemas: | |
Token: | |
required: | |
- id | |
- card | |
- created | |
- livemode | |
- object | |
- used | |
properties: | |
id: | |
type: string | |
card: | |
$ref: "#/components/schemas/Card" | |
created: | |
type: integer | |
format: int32 | |
livemode: | |
type: boolean | |
object: | |
type: string | |
used: | |
type: boolean | |
Card: | |
required: | |
- id # TODO | |
ErrorResponse: | |
required: | |
- error | |
properties: | |
error: | |
$ref: "#/components/schemas/Error" | |
Error: | |
required: | |
- message | |
- type | |
properties: | |
code: | |
type: string | |
message: | |
type: string | |
type: | |
type: string | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment