Saltar al contenido principal
GET
/
v1
/
billing
/
payment_method
Get Payment Methods
import requests

url = "https://api.diga.io/v1/billing/payment_method/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
[
  {
    "id": "<string>",
    "type": "<string>",
    "card": {
      "brand": "<string>",
      "last4": "<string>",
      "exp_month": 123,
      "exp_year": 123
    },
    "link": {
      "email": "<string>"
    },
    "is_default": false
  }
]

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Respuesta

Successful Response

id
string
requerido

Unique identifier for the payment method

type
string
requerido

Type of the payment method. In this app, only card is supported.

card
Card · object
requerido

Schema representing a card object (a type of payment method - the only allowed in the app). Check more at https://docs.stripe.com/api/cards?api-version=2025-04-30.preview

Schema representing a link object (a type of payment method). Check more at https://docs.stripe.com/api/payment_methods/object?api-version=2025-04-30.preview#payment_method_object-link

is_default
boolean
predeterminado:false

Whether this payment method is the default for the customer