Maton

Stripe

Access the Stripe API with managed OAuth authentication. Manage customers, subscriptions, invoices, products, prices, and process payments.

All Stripe API endpoints follow this pattern:

/stripe/v1/{resource}

Reference

Get Balance

GET /stripe/v1/balance
maton stripe balance

Response:

{
  "object": "balance",
  "available": [
    {
      "amount": 0,
      "currency": "usd",
      "source_types": {"card": 0}
    }
  ],
  "pending": [
    {
      "amount": 5000,
      "currency": "usd",
      "source_types": {"card": 5000}
    }
  ]
}

List Balance Transactions

GET /stripe/v1/balance_transactions?limit=10
maton stripe balance-transaction list -L 10

List Customers

GET /stripe/v1/customers?limit=10
maton stripe customer list -L 10

Query Parameters:

ParameterDescription
limitNumber of results (1-100, default: 10)
starting_afterCursor for pagination
ending_beforeCursor for reverse pagination
emailFilter by email
createdFilter by creation date

Response:

{
  "object": "list",
  "data": [
    {
      "id": "cus_TxKtN8Irvzx9BQ",
      "object": "customer",
      "email": "customer@example.com",
      "name": null,
      "balance": 0,
      "currency": "usd",
      "created": 1770765579,
      "metadata": {}
    }
  ],
  "has_more": true,
  "url": "/v1/customers"
}

Get Customer

GET /stripe/v1/customers/{customer_id}
maton stripe customer view {customer_id}

Create Customer

POST /stripe/v1/customers
Content-Type: application/x-www-form-urlencoded

email=customer@example.com&name=John%20Doe&metadata[user_id]=123
maton stripe customer create --email customer@example.com --name 'John Doe' --metadata user_id=123

Update Customer

POST /stripe/v1/customers/{customer_id}
Content-Type: application/x-www-form-urlencoded

name=Jane%20Doe&email=jane@example.com
maton stripe customer update {customer_id} --name 'Jane Doe' --email jane@example.com

Delete Customer

DELETE /stripe/v1/customers/{customer_id}
maton stripe customer delete {customer_id}

List Products

GET /stripe/v1/products?limit=10
maton stripe product list -L 10

Query Parameters:

ParameterDescription
activeFilter by active status
typeFilter by type: good or service

Response:

{
  "object": "list",
  "data": [
    {
      "id": "prod_TthCLBwTIXuzEw",
      "object": "product",
      "active": true,
      "name": "Premium Plan",
      "description": "Premium subscription",
      "type": "service",
      "created": 1769926024,
      "metadata": {}
    }
  ],
  "has_more": true
}

Get Product

GET /stripe/v1/products/{product_id}
maton stripe product view {product_id}

Create Product

POST /stripe/v1/products
Content-Type: application/x-www-form-urlencoded

name=Premium%20Plan&description=Premium%20subscription
maton stripe product create --name 'Premium Plan' --description 'Premium subscription'

Update Product

POST /stripe/v1/products/{product_id}
Content-Type: application/x-www-form-urlencoded

name=Updated%20Plan&active=true
maton stripe product update {product_id} --name 'Updated Plan' --active true

Delete Product

DELETE /stripe/v1/products/{product_id}
maton stripe product delete {product_id}

List Prices

GET /stripe/v1/prices?limit=10
maton stripe price list -L 10

Query Parameters:

ParameterDescription
activeFilter by active status
productFilter by product ID
typeFilter: one_time or recurring
currencyFilter by currency

Response:

{
  "object": "list",
  "data": [
    {
      "id": "price_1SvtoVDfFKJhF88gKJv2eSmO",
      "object": "price",
      "active": true,
      "currency": "usd",
      "product": "prod_TthCLBwTIXuzEw",
      "unit_amount": 1999,
      "recurring": {
        "interval": "month",
        "interval_count": 1
      },
      "type": "recurring"
    }
  ],
  "has_more": true
}

Get Price

GET /stripe/v1/prices/{price_id}
maton stripe price view {price_id}

Create Price

POST /stripe/v1/prices
Content-Type: application/x-www-form-urlencoded

product=prod_XXX&unit_amount=1999&currency=usd&recurring[interval]=month
maton stripe price create --product prod_XXX --unit-amount 1999 --currency usd --recurring-interval month

Update Price

POST /stripe/v1/prices/{price_id}
Content-Type: application/x-www-form-urlencoded

active=false
maton stripe price update {price_id} --active false

List Subscriptions

GET /stripe/v1/subscriptions?limit=10
maton stripe subscription list -L 10

Query Parameters:

ParameterDescription
customerFilter by customer ID
priceFilter by price ID
statusFilter: active, canceled, past_due, etc.

Response:

{
  "object": "list",
  "data": [
    {
      "id": "sub_1SzQDXDfFKJhF88gf72x6tDh",
      "object": "subscription",
      "customer": "cus_TxKtN8Irvzx9BQ",
      "status": "active",
      "current_period_start": 1770765579,
      "current_period_end": 1773184779,
      "items": {
        "data": [
          {
            "id": "si_TxKtFWxlUW50cR",
            "price": {
              "id": "price_1RGbXsDfFKJhF88gMIShAq9m",
              "unit_amount": 0
            },
            "quantity": 1
          }
        ]
      }
    }
  ],
  "has_more": true
}

Get Subscription

GET /stripe/v1/subscriptions/{subscription_id}
maton stripe subscription view {subscription_id}

Create Subscription

POST /stripe/v1/subscriptions
Content-Type: application/x-www-form-urlencoded

customer=cus_XXX&items[0][price]=price_XXX
maton stripe subscription create --customer cus_XXX --price price_XXX

Update Subscription

POST /stripe/v1/subscriptions/{subscription_id}
Content-Type: application/x-www-form-urlencoded

items[0][id]=si_XXX&items[0][price]=price_YYY
maton stripe subscription update {subscription_id} --items 'id=si_XXX,price=price_YYY'

Cancel Subscription

DELETE /stripe/v1/subscriptions/{subscription_id}
maton stripe subscription cancel {subscription_id}

List Invoices

GET /stripe/v1/invoices?limit=10
maton stripe invoice list -L 10

Query Parameters:

ParameterDescription
customerFilter by customer ID
subscriptionFilter by subscription ID
statusFilter: draft, open, paid, void, uncollectible

Response:

{
  "object": "list",
  "data": [
    {
      "id": "in_1SzQDXDfFKJhF88g3nh4u2GS",
      "object": "invoice",
      "customer": "cus_TxKtN8Irvzx9BQ",
      "amount_due": 0,
      "amount_paid": 0,
      "currency": "usd",
      "status": "paid",
      "subscription": "sub_1SzQDXDfFKJhF88gf72x6tDh",
      "hosted_invoice_url": "https://invoice.stripe.com/...",
      "invoice_pdf": "https://pay.stripe.com/invoice/.../pdf"
    }
  ],
  "has_more": true
}

Get Invoice

GET /stripe/v1/invoices/{invoice_id}
maton stripe invoice view {invoice_id}

Create Invoice

POST /stripe/v1/invoices
Content-Type: application/x-www-form-urlencoded

customer=cus_XXX
maton stripe invoice create --customer cus_XXX

Finalize Invoice

POST /stripe/v1/invoices/{invoice_id}/finalize
maton stripe invoice finalize {invoice_id}

Pay Invoice

POST /stripe/v1/invoices/{invoice_id}/pay
maton stripe invoice pay {invoice_id}

Void Invoice

POST /stripe/v1/invoices/{invoice_id}/void
maton stripe invoice void {invoice_id}

List Charges

GET /stripe/v1/charges?limit=10
maton stripe charge list -L 10

Query Parameters:

ParameterDescription
customerFilter by customer ID
payment_intentFilter by payment intent

Response:

{
  "object": "list",
  "data": [
    {
      "id": "ch_3SyXBvDfFKJhF88g1MHtT45f",
      "object": "charge",
      "amount": 5000,
      "currency": "usd",
      "customer": "cus_TuZ7GIjeZQOQ2m",
      "paid": true,
      "status": "succeeded",
      "payment_method_details": {
        "card": {
          "brand": "mastercard",
          "last4": "0833"
        },
        "type": "card"
      }
    }
  ],
  "has_more": true
}

Get Charge

GET /stripe/v1/charges/{charge_id}
maton stripe charge view {charge_id}

Create Charge

POST /stripe/v1/charges
Content-Type: application/x-www-form-urlencoded

amount=2000&currency=usd&source=tok_XXX
maton stripe charge create --amount 2000 --currency usd --source tok_XXX

List Payment Intents

GET /stripe/v1/payment_intents?limit=10
maton stripe payment list -L 10

Response:

{
  "object": "list",
  "data": [
    {
      "id": "pi_3SyXBvDfFKJhF88g17PeHdpE",
      "object": "payment_intent",
      "amount": 5000,
      "currency": "usd",
      "customer": "cus_TuZ7GIjeZQOQ2m",
      "status": "succeeded",
      "payment_method": "pm_1SyXBpDfFKJhF88gmP3IjC8C"
    }
  ],
  "has_more": true
}

Get Payment Intent

GET /stripe/v1/payment_intents/{payment_intent_id}
maton stripe payment view {payment_intent_id}

Create Payment Intent

POST /stripe/v1/payment_intents
Content-Type: application/x-www-form-urlencoded

amount=2000&currency=usd&customer=cus_XXX&payment_method_types[]=card
maton stripe payment create --amount 2000 --currency usd --customer cus_XXX --payment-method-types card

Confirm Payment Intent

POST /stripe/v1/payment_intents/{payment_intent_id}/confirm
maton stripe payment confirm {payment_intent_id}

Cancel Payment Intent

POST /stripe/v1/payment_intents/{payment_intent_id}/cancel
maton stripe payment cancel {payment_intent_id}

List Payment Methods

GET /stripe/v1/payment_methods?customer=cus_XXX&type=card
maton stripe payment-method list --customer cus_XXX --type card

Get Payment Method

GET /stripe/v1/payment_methods/{payment_method_id}
maton stripe payment-method view {payment_method_id}

Attach Payment Method

POST /stripe/v1/payment_methods/{payment_method_id}/attach
Content-Type: application/x-www-form-urlencoded

customer=cus_XXX
maton stripe payment-method attach {payment_method_id} --customer cus_XXX

Detach Payment Method

POST /stripe/v1/payment_methods/{payment_method_id}/detach
maton stripe payment-method detach {payment_method_id}

List Coupons

GET /stripe/v1/coupons?limit=10
maton stripe coupon list -L 10

Get Coupon

GET /stripe/v1/coupons/{coupon_id}
maton stripe coupon view {coupon_id}

Create Coupon

POST /stripe/v1/coupons
Content-Type: application/x-www-form-urlencoded

percent_off=25&duration=once
maton stripe coupon create --percent-off 25 --duration once

Delete Coupon

DELETE /stripe/v1/coupons/{coupon_id}
maton stripe coupon delete {coupon_id}

List Refunds

GET /stripe/v1/refunds?limit=10
maton stripe refund list -L 10

Get Refund

GET /stripe/v1/refunds/{refund_id}
maton stripe refund view {refund_id}

Create Refund

POST /stripe/v1/refunds
Content-Type: application/x-www-form-urlencoded

charge=ch_XXX&amount=1000
maton stripe refund create --charge ch_XXX --amount 1000

Maton Events

charge.succeeded

invoice.paid

subscription.created

subscription.canceled

invoice.payment_failed

Resources

On this page