Skip to main content
The payment method object represents a stored payment instrument for an organization. The object is a discriminated union — its shape varies depending on whether the payment method is a credit card (CARD) or bank slip (BOLETO).

Card

paymentMethodId
string
The payment method unique identifier.
organizationId
string
O ID da organizacao.
type
string
O tipo do metodo de pagamento. Literal CARD.
brand
string
The card brand (e.g. visa, mastercard).
last4
string
The last four digits of the card number.
expMonth
integer
The card expiration month.
expYear
integer
The card expiration year.
isDefault
boolean
Se este e o metodo de pagamento padrao.
billingDetails
object
The billing details associated with this payment method.
{
  "paymentMethodId": "pm_1Oy2pL2eZvKYlo2C0vIqMZ8y",
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "type": "CARD",
  "brand": "visa",
  "last4": "4242",
  "expMonth": 12,
  "expYear": 2027,
  "isDefault": true,
  "billingDetails": {
    "name": "Maria Silva",
    "email": "maria@example.com",
    "phone": "+5511999990000",
    "address": {
      "line1": "Av. Paulista, 1000",
      "city": "Sao Paulo",
      "state": "SP",
      "postalCode": "01310-100",
      "country": "BR"
    }
  }
}

Boleto

paymentMethodId
string
The payment method unique identifier.
organizationId
string
O ID da organizacao.
type
string
O tipo do metodo de pagamento. Literal BOLETO.
isDefault
boolean
Se este e o metodo de pagamento padrao.
billingDetails
object
The billing details associated with this payment method.
{
  "paymentMethodId": "pm_2Bz3qM3fAwLZmp3D1wJrNA9z",
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "type": "BOLETO",
  "isDefault": false,
  "billingDetails": {
    "name": "Maria Silva",
    "email": "maria@example.com",
    "phone": "+5511999990000",
    "address": {
      "line1": "Av. Paulista, 1000",
      "city": "Sao Paulo",
      "state": "SP",
      "postalCode": "01310-100",
      "country": "BR"
    }
  }
}