---
title: "Payment Methods"
description: "A stored instrument and the gateway it lives at."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/payment-methods"
---
# Payment Methods

> A stored instrument and the gateway it lives at.

A stored instrument and the gateway it lives at. **We never hold a card number** — the gateway vaults it and returns a token, which is what these endpoints manage. Some instruments need the buyer to approve the mandate first; `setup` begins that flow and the vault completes it once they have.

An instrument carries a **role**, not just a default flag. Collection tries the subscription's own method first, then the customer's primary, then their backup if the primary HARD-declines — so a dead card does not have to become a failed renewal. A soft, retriable decline is not a fallback: it is retried on the same instrument.

**Gateway accounts** are also here — the connections themselves, their credential verification, and provisioning the notification endpoint the gateway calls back on. A business can hold several and route by currency and method type.

## Endpoints

<table>
<thead>
  <tr>
    <th>
      Method
    </th>
    
    <th>
      Endpoint
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/list-payment-methods">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods
        </code>
      </a>
    </td>
    
    <td>
      List payment methods
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/vault-a-payment-method">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods
        </code>
      </a>
    </td>
    
    <td>
      Vault a payment method
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/get-a-payment-method">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/{pm}
        </code>
      </a>
    </td>
    
    <td>
      Get a payment method
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/detach">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/{pm}
        </code>
      </a>
    </td>
    
    <td>
      Detach (delete) a payment method
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/assign-a-collection-role">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/{pm}/assign_role
        </code>
      </a>
    </td>
    
    <td>
      Assign a collection role (primary | backup | none) to a payment method
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/set-the-default-payment-method">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/{pm}/default
        </code>
      </a>
    </td>
    
    <td>
      Set the default payment method
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/delete-our-record-of-a-payment-method">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/{pm}/delete_local
        </code>
      </a>
    </td>
    
    <td>
      Delete our record of a payment method, leaving the gateway's copy
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/attach-a-payment-method-already-vaulted-at-the-g">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/permanent_token
        </code>
      </a>
    </td>
    
    <td>
      Attach a payment method already vaulted at the gateway
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/begin-a-buyer-approval-vault-flow">
        <code>
          /v1/businesses/{biz}/customers/{cus}/payment_methods/setup
        </code>
      </a>
    </td>
    
    <td>
      Begin a buyer-approval vault flow
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/mint-a-customer-portal-session">
        <code>
          /v1/businesses/{biz}/customers/{cus}/portal_sessions
        </code>
      </a>
    </td>
    
    <td>
      Mint a customer portal session
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/retrieve-a-customer-portal-session">
        <code>
          /v1/businesses/{biz}/customers/{cus}/portal_sessions/{id}
        </code>
      </a>
    </td>
    
    <td>
      Retrieve a customer portal session
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/revoke-a-customer-portal-session">
        <code>
          /v1/businesses/{biz}/customers/{cus}/portal_sessions/{id}/revoke
        </code>
      </a>
    </td>
    
    <td>
      Revoke a customer portal session
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/list-gateway-accounts">
        <code>
          /v1/businesses/{biz}/gateway_accounts
        </code>
      </a>
    </td>
    
    <td>
      List gateway accounts
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/create-a-gateway-account">
        <code>
          /v1/businesses/{biz}/gateway_accounts
        </code>
      </a>
    </td>
    
    <td>
      Create a gateway account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/get-a-gateway-account">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}
        </code>
      </a>
    </td>
    
    <td>
      Get a gateway account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PATCH
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/update-a-gateway-account">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}
        </code>
      </a>
    </td>
    
    <td>
      Update a gateway account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/delete-a-gateway-account">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}
        </code>
      </a>
    </td>
    
    <td>
      Delete a gateway account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/get-a-gateway-account-s-balance">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}/balance
        </code>
      </a>
    </td>
    
    <td>
      Get a gateway account's balance
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/verify-a-gateway-account-s-credentials">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}/verify
        </code>
      </a>
    </td>
    
    <td>
      Verify a gateway account's credentials
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/register-a-storefront-domain-for-wallet-buttons">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}/wallet_domains
        </code>
      </a>
    </td>
    
    <td>
      Register a storefront domain for wallet buttons
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/get-the-per-account-webhook-endpoint-config">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}/webhook_endpoint
        </code>
      </a>
    </td>
    
    <td>
      Get the per-account webhook endpoint config
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/provision-the-webhook-endpoint">
        <code>
          /v1/businesses/{biz}/gateway_accounts/{gwa}/webhook_endpoint
        </code>
      </a>
    </td>
    
    <td>
      Provision the webhook endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/ask-the-gateway-what-became-of-an-in-progress-ch">
        <code>
          /v1/businesses/{biz}/transactions/{txn}/sync
        </code>
      </a>
    </td>
    
    <td>
      Ask the gateway what became of an in-progress charge
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/payment-methods/list-the-supported-payment-gateways">
        <code>
          /v1/gateways
        </code>
      </a>
    </td>
    
    <td>
      List the supported payment gateways
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
