Recharge Payment Methods API

Tokenized payment methods used to process charges.

OpenAPI Specification

recharge-payments-payment-methods-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Recharge Addresses Payment Methods API
  description: The Recharge API is a REST API (with a few RPC-style action endpoints) for building and operating subscription and recurring-billing commerce on top of Recharge. It has predictable, resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP status codes and verbs. All requests are made over HTTPS to https://api.rechargeapps.com and authenticated with a store API token passed in the X-Recharge-Access-Token header. The API is versioned via the X-Recharge-Version header; supported versions are 2021-11 (recommended) and 2021-01. This document grounds a representative subset of the public surface - Subscriptions, Customers, Orders, Charges, Products, Addresses, Payment Methods, Onetimes, Discounts, and Webhook endpoints. See developer.rechargepayments.com for the complete reference.
  version: 2021-11
  contact:
    name: Recharge
    url: https://developer.rechargepayments.com
  termsOfService: https://getrecharge.com/legal
servers:
- url: https://api.rechargeapps.com
  description: Recharge API
security:
- apiToken: []
tags:
- name: Payment Methods
  description: Tokenized payment methods used to process charges.
paths:
  /payment_methods:
    get:
      operationId: listPaymentMethods
      tags:
      - Payment Methods
      summary: List payment methods
      responses:
        '200':
          description: A list of payment methods.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_methods:
                    type: array
                    items:
                      $ref: '#/components/schemas/PaymentMethod'
    post:
      operationId: createPaymentMethod
      tags:
      - Payment Methods
      summary: Create a payment method
      responses:
        '201':
          description: The created payment method.
  /payment_methods/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getPaymentMethod
      tags:
      - Payment Methods
      summary: Retrieve a payment method
      responses:
        '200':
          description: The requested payment method.
    put:
      operationId: updatePaymentMethod
      tags:
      - Payment Methods
      summary: Update a payment method
      responses:
        '200':
          description: The updated payment method.
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: integer
        format: int64
  schemas:
    PaymentMethod:
      type: object
      properties:
        id:
          type: integer
          format: int64
        customer_id:
          type: integer
          format: int64
        payment_type:
          type: string
        processor_name:
          type: string
        default:
          type: boolean
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: X-Recharge-Access-Token
      description: Store API token generated in the Recharge merchant portal under Apps and integrations.