Payment Gateway Sign in

API reference

Payment gateway API, version 1.0.0. Generated from the OpenAPI document served at /v1/openapi.json. Authenticate with an Authorization: Bearer header carrying a project API key. List endpoints accept limit (1 to 100) and cursor, and return the next cursor in the X-Next-Cursor header.

GET /events

Pull the event feed, oldest first. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno
typequeryno

GET /methods

List enabled payment methods. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno

GET /openapi.json

This document. Required scope: undefined.

GET /payments

List payments. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno
statusqueryno
referencequeryno
customer_refqueryno
created_fromqueryno
created_toqueryno

POST /payments

Create a payment. Required scope: payments:write.

Request body CreatePayment:

FieldType
amountinteger
cancel_urlstring
currencystring
customer_emailstring
customer_refstring
descriptionstring
discountany
line_itemsarray
metadataobject
methodsarray
referencestring
success_urlstring
taxinteger

GET /payments/{id}

Get a payment. Required scope: payments:read.

ParameterInRequired
idpathyes

POST /payments/{id}/attempts

Start a payment attempt. Required scope: payments:write.

ParameterInRequired
idpathyes

Request body CreateAttempt:

FieldType
methodstring
optionstring
save_methodboolean

POST /payments/{id}/cancel

Cancel a payment. Required scope: payments:write.

ParameterInRequired
idpathyes

POST /payments/{id}/refund

Refund a payment. Required scope: refunds:write.

ParameterInRequired
idpathyes

Request body RefundInput:

FieldType
amountinteger
destinationstring

GET /plans

List billing plans. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno

POST /plans

Create a billing plan. Required scope: payments:write.

Request body CreatePlan:

FieldType
amountinteger
currencystring
descriptionstring
grace_daysinteger
intervalstring
interval_countinteger
namestring
trial_daysinteger

GET /plans/{id}

Get a billing plan. Required scope: payments:read.

ParameterInRequired
idpathyes

POST /plans/{id}/archive

Archive a billing plan. Required scope: payments:write.

ParameterInRequired
idpathyes

GET /rates

Current BTC rates. Required scope: payments:read.

GET /refunds

List refunds. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno
payment_idqueryno
statusqueryno

GET /saved-methods

List saved payment methods. Required scope: saved:write or payments:read.

ParameterInRequired
limitqueryno
cursorqueryno
customer_refqueryno

DELETE /saved-methods/{id}

Delete a saved payment method. Required scope: saved:write.

ParameterInRequired
idpathyes

POST /saved-methods/{id}/charge

Charge a saved payment method. Required scope: saved:write.

ParameterInRequired
idpathyes

Request body CreatePayment:

FieldType
amountinteger
cancel_urlstring
currencystring
customer_emailstring
customer_refstring
descriptionstring
discountany
line_itemsarray
metadataobject
methodsarray
referencestring
success_urlstring
taxinteger

GET /subscriptions

List subscriptions. Required scope: payments:read.

ParameterInRequired
limitqueryno
cursorqueryno
customer_refqueryno
statusqueryno

POST /subscriptions

Create a subscription. Required scope: payments:write.

Request body CreateSubscription:

FieldType
customer_refstring
plan_idinteger
saved_method_idinteger

GET /subscriptions/{id}

Get a subscription with its billing history. Required scope: payments:read.

ParameterInRequired
idpathyes

POST /subscriptions/{id}/cancel

Cancel a subscription now or at period end. Required scope: payments:write.

ParameterInRequired
idpathyes

Request body CancelSubscription:

FieldType
at_period_endboolean

POST /subscriptions/{id}/change-plan

Change plan, optionally prorating. Required scope: payments:write.

ParameterInRequired
idpathyes

Request body ChangePlan:

FieldType
plan_idinteger
prorationstring

POST /subscriptions/{id}/pause

Pause a subscription. Required scope: payments:write.

ParameterInRequired
idpathyes

POST /subscriptions/{id}/resume

Resume a subscription. Required scope: payments:write.

ParameterInRequired
idpathyes