Skip to main content
Payment method types define the various payment instruments supported by VaultSaaS SDK.

PaymentMethodInput

Payment method input discriminated by type. Supports card (token or raw), bank transfer, wallet, PIX, and boleto payment methods. This is a discriminated union type where the shape depends on the type field.

Card with Token

type
'card'
required
Payment method type.
token
string
required
Tokenized card identifier from the provider.

Example

const paymentMethod: PaymentMethodInput = {
  type: 'card',
  token: 'tok_visa_4242'
};

Card with Raw Details

type
'card'
required
Payment method type.
number
string
required
Card number (PAN).
expMonth
number
required
Card expiration month (1-12).
expYear
number
required
Card expiration year (4 digits).
cvc
string
required
Card verification code (CVV/CVC).

Example

const paymentMethod: PaymentMethodInput = {
  type: 'card',
  number: '4242424242424242',
  expMonth: 12,
  expYear: 2025,
  cvc: '123'
};

Bank Transfer

type
'bank_transfer'
required
Payment method type.
bankCode
string
required
Bank identifier code.
accountNumber
string
required
Customer’s bank account number.

Example

const paymentMethod: PaymentMethodInput = {
  type: 'bank_transfer',
  bankCode: '001',
  accountNumber: '12345678'
};

Wallet

type
'wallet'
required
Payment method type.
walletType
string
required
Wallet provider (e.g. “apple_pay”, “google_pay”).
token
string
required
Tokenized wallet payment data.

Example

const paymentMethod: PaymentMethodInput = {
  type: 'wallet',
  walletType: 'apple_pay',
  token: 'tok_apple_pay_abc123'
};

PIX

type
'pix'
required
Payment method type for Brazilian instant payments.

Example

const paymentMethod: PaymentMethodInput = {
  type: 'pix'
};

Boleto

type
'boleto'
required
Payment method type for Brazilian boleto payments.
customerDocument
string
required
Customer’s CPF or CNPJ document number.

Example

const paymentMethod: PaymentMethodInput = {
  type: 'boleto',
  customerDocument: '12345678900'
};

PaymentMethodInfo

Describes a payment method supported by a provider for a given country/currency combination. Returned by listPaymentMethods.
type
string
Payment method type identifier (e.g. “card”, “pix”, “bank_transfer”).
provider
string
Provider name that supports this payment method.
name
string
Human-readable display name.
currencies
string[]
ISO 4217 currency codes this method supports.
countries
string[]
ISO 3166-1 alpha-2 country codes this method supports.
minAmount
number
Minimum amount in smallest currency unit, if applicable.
maxAmount
number
Maximum amount in smallest currency unit, if applicable.

Example Response

const methodInfo: PaymentMethodInfo = {
  type: 'pix',
  provider: 'pagarme',
  name: 'PIX',
  currencies: ['BRL'],
  countries: ['BR'],
  minAmount: 100, // R$ 1.00 in centavos
  maxAmount: 1000000 // R$ 10,000.00 in centavos
};

Build docs developers (and LLMs) love