raims

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Raims Go

Go SDK for server applications that use the Raims public API. Requires Go 1.26.5 or later and uses only the standard library at runtime.

Installation and updates

In a project with a go.mod file, run:

go get github.com/raimshq/raims-go@latest

To update, run the same command and test your application's integration. Review the release notes before updating. The package manager records the selected version in your project; future updates are not applied automatically.

First use

Import the github.com/raimshq/raims-go module in your application:

package main

import (
    "context"
    "fmt"
    "log"
    "os"

    raims "github.com/raimshq/raims-go"
)

func main() {
    client, err := raims.NewClient(os.Getenv("RAIMS_API_KEY"))
    if err != nil {
        log.Fatal(err)
    }
    defer client.CloseIdleConnections()

    page, err := client.Customers.List(context.Background(), &raims.ListCustomersParams{
        PageSize: raims.Set[int64](20),
    })
    if err != nil {
        log.Fatal(err)
    }
    for _, customer := range page.List {
        fmt.Println(customer.ID)
    }
}

Reuse the client across requests and goroutines. The key determines the company, environment and permissions. The base URL is https://api.raims.com. Keep credentials, personal identity documents and temporary links out of the browser, version control and logs.

Create a charge

With the client configured, use a customer ID from the account and the order data:

charge, err := client.Charges.Create(ctx, &raims.CreateChargeParams{
    CustomerID:  raims.Set(customerID),
    AmountCents: raims.Set[int64](15000),
    DueDate:     raims.Set(dueDateUnix),
    Title:       raims.Set("Order 1234"),
}, raims.WithIdempotencyKey(persistedOrderKey))
if err != nil {
    return err
}
requestID := charge.LastResponse.RequestID
pending := charge.LastResponse.StatusCode == 202

customerID is the identifier returned by the API, dueDateUnix is an int64 with the selected due date in Unix seconds UTC, and persistedOrderKey identifies the intent to create the charge. Persist the key and parameters before sending the request. 15000 represents BRL 150.00. A 202 response means the result is pending; check the resource before treating the operation as complete or retrying the intent.

Services

Service Resources
Accounts Context, account details, fees and checkout
Balances Balance and forecast
Customers Customer registration and lookup
Charges Charges, payments, documents and refunds for a charge
PaymentLinks Payment links and requests to send them by email
Refunds Refunds and receipts
Disputes Disputes
Statements Statements
Withdrawals Withdrawals, limits, summary and automatic settings
WithdrawalDestinations Withdrawal destinations
Webhooks Registration, pause, health, testing and secret rotation
WebhookEventTypes Event types
Simulations.Charges and Simulations.Refunds Simulations with a Sandbox credential

Services provide methods such as Create, Get, Update and List, depending on the resource. ListAll returns an iterator with Next, Current, Err and All.

Guides

Distributed under the MIT license.

Documentation

Overview

Package raims provides typed services for the Raims public API.

Reuse a Client across requests and pass a context.Context to every call. Amounts use int64 cents and timestamps use Unix seconds. Request fields use Optional to distinguish omission, null and explicit values. Writes are never retried automatically, including when an idempotency key is supplied.

Index

Constants

View Source
const (
	Production                                                    Environment = "Production"
	Sandbox                                                       Environment = "Sandbox"
	AccountContextAmountUnitCents                                             = "cents"
	AccountContextBusinessTimezoneAmericaSaoPaulo                             = "America/Sao_Paulo"
	AccountContextCompanyStatusActive                                         = "active"
	AccountContextCompanyStatusLimited                                        = "limited"
	AccountContextCompanyStatusPending                                        = "pending"
	AccountContextCurrencyBRL                                                 = "BRL"
	AccountContextDataEnvironmentProduction                                   = "production"
	AccountContextDataEnvironmentSandbox                                      = "sandbox"
	AccountContextTimestampUnitUnixSeconds                                    = "unix_seconds"
	BalanceForecastPeriodLast15Days                                           = "last_15_days"
	BalanceForecastPeriodLast30Days                                           = "last_30_days"
	BalanceForecastPeriodLast7Days                                            = "last_7_days"
	BalanceForecastPeriodToday                                                = "today"
	ChargeCreatedPaymentMethodTypesItemBoleto                     int64       = 2
	ChargeCreatedPaymentMethodTypesItemPix                        int64       = 1
	ChargeListItemPaymentMethodTypesItemBoleto                    int64       = 2
	ChargeListItemPaymentMethodTypesItemPix                       int64       = 1
	ChargePaymentInformationBoletoPaymentStatusAwaitingPayment                = "awaiting_payment"
	ChargePaymentInformationBoletoPaymentStatusCompensated                    = "compensated"
	ChargePaymentInformationBoletoPaymentStatusSettled                        = "settled"
	ChargePaymentInformationBoletoStatusAvailable                             = "available"
	ChargePaymentInformationBoletoStatusFailed                                = "failed"
	ChargePaymentInformationBoletoStatusNotGenerated                          = "not_generated"
	ChargePaymentInformationBoletoStatusPending                               = "pending"
	ChargePaymentInformationPixStatusAvailable                                = "available"
	ChargePaymentInformationPixStatusFailed                                   = "failed"
	ChargePaymentInformationPixStatusNotGenerated                             = "not_generated"
	ChargePaymentInformationPixStatusPending                                  = "pending"
	ChargePaymentMethodTypesItemBoleto                            int64       = 2
	ChargePaymentMethodTypesItemPix                               int64       = 1
	ChargeScenarioActionBoletoIssuance                                        = "boleto_issuance"
	ChargeScenarioActionCancellation                                          = "cancellation"
	ChargeScenarioActionPixIssuance                                           = "pix_issuance"
	ChargeScenarioOutcomeCompleted                                            = "completed"
	ChargeScenarioOutcomeFailed                                               = "failed"
	ChargeScenarioOutcomePending                                              = "pending"
	ChargeScenarioParamsActionBoletoIssuance                                  = "boleto_issuance"
	ChargeScenarioParamsActionCancellation                                    = "cancellation"
	ChargeScenarioParamsActionPixIssuance                                     = "pix_issuance"
	ChargeScenarioParamsOutcomeFailed                                         = "failed"
	ChargeScenarioParamsOutcomePending                                        = "pending"
	ChargeScenarioStateCompleted                                              = "completed"
	ChargeScenarioStateConfigured                                             = "configured"
	ChargeScenarioStateFailed                                                 = "failed"
	ChargeScenarioStatePending                                                = "pending"
	ChargeStatisticsPeriodLast15Days                                          = "last_15_days"
	ChargeStatisticsPeriodLast30Days                                          = "last_30_days"
	ChargeStatisticsPeriodLast7Days                                           = "last_7_days"
	ChargeStatisticsPeriodToday                                               = "today"
	CheckoutAssetErrorCodeCHECKOUTASSETINVALIDIMAGE                           = "CHECKOUT_ASSET_INVALID_IMAGE"
	CheckoutAssetErrorCodeCHECKOUTASSETPROCESSINGFAILED                       = "CHECKOUT_ASSET_PROCESSING_FAILED"
	CheckoutAssetErrorCodeCHECKOUTASSETUPLOADNOTFOUND                         = "CHECKOUT_ASSET_UPLOAD_NOT_FOUND"
	CheckoutAssetStatusAbsent                                                 = "absent"
	CheckoutAssetStatusFailed                                                 = "failed"
	CheckoutAssetStatusPending                                                = "pending"
	CheckoutAssetStatusReady                                                  = "ready"
	CheckoutAssetUploadContentTypeImageJpeg                                   = "image/jpeg"
	CheckoutAssetUploadContentTypeImagePng                                    = "image/png"
	CreateChargeParamsPaymentMethodBoleto                         int64       = 2
	CreateChargeParamsPaymentMethodIndefinido                     int64       = 0
	CreateChargeParamsPaymentMethodPix                            int64       = 1
	CreateChargeParamsPaymentMethodTypesItemBoleto                int64       = 2
	CreateChargeParamsPaymentMethodTypesItemPix                   int64       = 1
	CreateCheckoutFaviconUploadParamsContentTypeImageJpeg                     = "image/jpeg"
	CreateCheckoutFaviconUploadParamsContentTypeImagePng                      = "image/png"
	CreateCheckoutLogoUploadParamsContentTypeImageJpeg                        = "image/jpeg"
	CreateCheckoutLogoUploadParamsContentTypeImagePng                         = "image/png"
	CreatePaymentLinkParamsPaymentMethodTypesItemBoleto           int64       = 2
	CreatePaymentLinkParamsPaymentMethodTypesItemPix              int64       = 1
	CreateWebhookParamsEventsItemChargeCanceled                               = "charge.canceled"
	CreateWebhookParamsEventsItemChargeCreated                                = "charge.created"
	CreateWebhookParamsEventsItemChargeFailed                                 = "charge.failed"
	CreateWebhookParamsEventsItemChargePaid                                   = "charge.paid"
	CreateWebhookParamsEventsItemRefundCompleted                              = "refund.completed"
	CreateWebhookParamsEventsItemRefundFailed                                 = "refund.failed"
	CreateWebhookParamsEventsItemRefundRequested                              = "refund.requested"
	CustomerCreatedTaxIDTypeCNPJ                                              = "cnpj"
	CustomerCreatedTaxIDTypeCPF                                               = "cpf"
	CustomerListItemTaxIDTypeCNPJ                                             = "cnpj"
	CustomerListItemTaxIDTypeCPF                                              = "cpf"
	DisputeInfractionResultAgreed                                             = "agreed"
	DisputeInfractionResultDisagreed                                          = "disagreed"
	DisputeKindChargeback                                                     = "chargeback"
	DisputeKindMed                                                            = "med"
	DisputeListItemKindChargeback                                             = "chargeback"
	DisputeListItemKindMed                                                    = "med"
	DisputeListItemStageCancelled                                             = "cancelled"
	DisputeListItemStageClosed                                                = "closed"
	DisputeListItemStageFailed                                                = "failed"
	DisputeListItemStageInAnalysis                                            = "in_analysis"
	DisputeListItemStageOpen                                                  = "open"
	DisputeListItemStageRefundInAnalysis                                      = "refund_in_analysis"
	DisputeListItemStageRejected                                              = "rejected"
	DisputeRefundResultPartiallyAccepted                                      = "partially_accepted"
	DisputeRefundResultRejected                                               = "rejected"
	DisputeRefundResultTotallyAccepted                                        = "totally_accepted"
	DisputeStageCancelled                                                     = "cancelled"
	DisputeStageClosed                                                        = "closed"
	DisputeStageFailed                                                        = "failed"
	DisputeStageInAnalysis                                                    = "in_analysis"
	DisputeStageOpen                                                          = "open"
	DisputeStageRefundInAnalysis                                              = "refund_in_analysis"
	DisputeStageRejected                                                      = "rejected"
	GetBalanceForecastParamsPeriodLast15Days                                  = "last_15_days"
	GetBalanceForecastParamsPeriodLast30Days                                  = "last_30_days"
	GetBalanceForecastParamsPeriodLast7Days                                   = "last_7_days"
	GetBalanceForecastParamsPeriodToday                                       = "today"
	GetChargeStatisticsParamsPeriodLast15Days                                 = "last_15_days"
	GetChargeStatisticsParamsPeriodLast30Days                                 = "last_30_days"
	GetChargeStatisticsParamsPeriodLast7Days                                  = "last_7_days"
	GetChargeStatisticsParamsPeriodToday                                      = "today"
	ListChargesParamsSortKeyAmountCents                                       = "amount_cents"
	ListChargesParamsSortKeyCreatedAt                                         = "created_at"
	ListChargesParamsSortOrderAsc                                             = "asc"
	ListChargesParamsSortOrderDesc                                            = "desc"
	ListDisputesParamsSortKeyCreatedAt                                        = "created_at"
	ListDisputesParamsSortKeyDisputedAmountCents                              = "disputed_amount_cents"
	ListDisputesParamsSortOrderAsc                                            = "asc"
	ListDisputesParamsSortOrderDesc                                           = "desc"
	ListStatementsParamsSortOrderAsc                                          = "asc"
	ListStatementsParamsSortOrderDesc                                         = "desc"
	ListWithdrawalsParamsSortOrderAsc                                         = "asc"
	ListWithdrawalsParamsSortOrderDesc                                        = "desc"
	PaymentLinkDetailsEffectivePaymentMethodTypesItemBoleto       int64       = 2
	PaymentLinkDetailsEffectivePaymentMethodTypesItemPix          int64       = 1
	PaymentLinkDetailsPaymentMethodTypesItemBoleto                int64       = 2
	PaymentLinkDetailsPaymentMethodTypesItemPix                   int64       = 1
	PaymentLinkPaymentMethodTypesItemBoleto                       int64       = 2
	PaymentLinkPaymentMethodTypesItemPix                          int64       = 1
	PaymentLinkUnavailableReasonCodeBOLETOAWAITINGSETTLEMENT                  = "BOLETO_AWAITING_SETTLEMENT"
	PaymentLinkUnavailableReasonCodeCHARGEEXPIRED                             = "CHARGE_EXPIRED"
	PaymentLinkUnavailableReasonCodeCHARGENOTOPEN                             = "CHARGE_NOT_OPEN"
	PaymentLinkUnavailableReasonCodePAYMENTLINKPAUSED                         = "PAYMENT_LINK_PAUSED"
	PaymentLinkUnavailableReasonCodePAYMENTMETHODSUNAVAILABLE                 = "PAYMENT_METHODS_UNAVAILABLE"
	PaymentLinkUnavailableReasonCodePIXCANCELLATIONPENDING                    = "PIX_CANCELLATION_PENDING"
	PaymentLinkUnavailableReasonCodePIXCANCELLED                              = "PIX_CANCELLED"
	RefundFailureReasonCodeREFUNDFAILUREREASONUNAVAILABLE                     = "REFUND_FAILURE_REASON_UNAVAILABLE"
	RefundFailureReasonCodeREFUNDNOTSUBMITTED                                 = "REFUND_NOT_SUBMITTED"
	RefundFailureReasonCodeREFUNDPROCESSINGFAILED                             = "REFUND_PROCESSING_FAILED"
	RefundFailureReasonCodeREFUNDPROCESSINGUNAVAILABLE                        = "REFUND_PROCESSING_UNAVAILABLE"
	RefundFailureReasonCodeREFUNDREJECTED                                     = "REFUND_REJECTED"
	RefundStatusAccepted                                                      = "accepted"
	RefundStatusCompleted                                                     = "completed"
	RefundStatusFailed                                                        = "failed"
	RefundStatusReserved                                                      = "reserved"
	RefundStatusUnknown                                                       = "unknown"
	RefundUnavailableReasonCodePIXREFUNDALREADYCOMPLETED                      = "PIX_REFUND_ALREADY_COMPLETED"
	RefundUnavailableReasonCodePIXREFUNDCASHINNOTFOUND                        = "PIX_REFUND_CASHIN_NOT_FOUND"
	RefundUnavailableReasonCodePIXREFUNDINPROGRESS                            = "PIX_REFUND_IN_PROGRESS"
	RefundUnavailableReasonCodePIXREFUNDINSUFFICIENTBALANCE                   = "PIX_REFUND_INSUFFICIENT_BALANCE"
	RefundUnavailableReasonCodePIXREFUNDNOTAVAILABLE                          = "PIX_REFUND_NOT_AVAILABLE"
	RefundUnavailableReasonCodePIXREFUNDPROVIDERACCOUNTNOTREADY               = "PIX_REFUND_PROVIDER_ACCOUNT_NOT_READY"
	RefundUnavailableReasonCodePIXREFUNDPROVIDERUNAVAILABLE                   = "PIX_REFUND_PROVIDER_UNAVAILABLE"
	ResolveChargeScenarioParamsActionBoletoIssuance                           = "boleto_issuance"
	ResolveChargeScenarioParamsActionCancellation                             = "cancellation"
	ResolveChargeScenarioParamsActionPixIssuance                              = "pix_issuance"
	ResolveChargeScenarioParamsOutcomeCompleted                               = "completed"
	ResolveChargeScenarioParamsOutcomeFailed                                  = "failed"
	StatementReferenceTypeAjuste                                  int64       = 4
	StatementReferenceTypeCobranca                                int64       = 1
	StatementReferenceTypeContestacao                             int64       = 2
	StatementReferenceTypeManual                                  int64       = 5
	StatementReferenceTypeSaque                                   int64       = 3
	StatementStatementTypeBloqueio                                int64       = 9
	StatementStatementTypeCreditoPorAjuste                        int64       = 7
	StatementStatementTypeDebitoPorAjuste                         int64       = 8
	StatementStatementTypeDevolucao                               int64       = 5
	StatementStatementTypeDevolucaoParcial                        int64       = 6
	StatementStatementTypeLiberacao                               int64       = 10
	StatementStatementTypeRecebimento                             int64       = 1
	StatementStatementTypeSaque                                   int64       = 4
	StatementStatementTypeTarifa                                  int64       = 2
	StatementStatementTypeTarifaDeServico                         int64       = 3
	UpdatePaymentLinkParamsPaymentMethodTypesItemBoleto           int64       = 2
	UpdatePaymentLinkParamsPaymentMethodTypesItemPix              int64       = 1
	WebhookCreatedDisabledReasonContinuousFailure                             = "continuous_failure"
	WebhookCreatedDisabledReasonManual                                        = "manual"
	WebhookDisabledReasonContinuousFailure                                    = "continuous_failure"
	WebhookDisabledReasonManual                                               = "manual"
	WebhookEventTypeCodeChargeCanceled                                        = "charge.canceled"
	WebhookEventTypeCodeChargeCreated                                         = "charge.created"
	WebhookEventTypeCodeChargeFailed                                          = "charge.failed"
	WebhookEventTypeCodeChargePaid                                            = "charge.paid"
	WebhookEventTypeCodeRefundCompleted                                       = "refund.completed"
	WebhookEventTypeCodeRefundFailed                                          = "refund.failed"
	WebhookEventTypeCodeRefundRequested                                       = "refund.requested"
	WebhookHealthStatusDisabled                                               = "disabled"
	WebhookHealthStatusFailing                                                = "failing"
	WebhookHealthStatusHealthy                                                = "healthy"
	WebhookHealthStatusUnknown                                                = "unknown"
	WithdrawalDestinationKeyTypeCNPJ                                          = "CNPJ"
	WithdrawalDestinationKeyTypeEMAIL                                         = "EMAIL"
	WithdrawalDestinationKeyTypeEVP                                           = "EVP"
	WithdrawalDestinationKeyTypePHONE                                         = "PHONE"
	WithdrawalFailureReasonCodeABOVEMAXIMUMWITHDRAWAL                         = "ABOVE_MAXIMUM_WITHDRAWAL"
	WithdrawalFailureReasonCodeBANKACCOUNTUNAVAILABLE                         = "BANK_ACCOUNT_UNAVAILABLE"
	WithdrawalFailureReasonCodeBANKPROCESSINGFAILURE                          = "BANK_PROCESSING_FAILURE"
	WithdrawalFailureReasonCodeBANKTIMEOUT                                    = "BANK_TIMEOUT"
	WithdrawalFailureReasonCodeBANKUNSUPPORTED                                = "BANK_UNSUPPORTED"
	WithdrawalFailureReasonCodeBELOWMINIMUMWITHDRAWAL                         = "BELOW_MINIMUM_WITHDRAWAL"
	WithdrawalFailureReasonCodeBLOCKEDBALANCE                                 = "BLOCKED_BALANCE"
	WithdrawalFailureReasonCodeDUPLICATEDREQUEST                              = "DUPLICATED_REQUEST"
	WithdrawalFailureReasonCodeINSUFFICIENTBALANCE                            = "INSUFFICIENT_BALANCE"
	WithdrawalFailureReasonCodeINTERNALERROR                                  = "INTERNAL_ERROR"
	WithdrawalFailureReasonCodeINVALIDACCOUNTTYPE                             = "INVALID_ACCOUNT_TYPE"
	WithdrawalFailureReasonCodeINVALIDBANKACCOUNT                             = "INVALID_BANK_ACCOUNT"
	WithdrawalFailureReasonCodeRISKPOLICYREJECTED                             = "RISK_POLICY_REJECTED"
	WithdrawalFailureReasonCodeWITHDRAWALFAILUREREASONUNAVAILABLE             = "WITHDRAWAL_FAILURE_REASON_UNAVAILABLE"
	WithdrawalFailureReasonCodeWITHDRAWALLIMITREACHED                         = "WITHDRAWAL_LIMIT_REACHED"
	WithdrawalFailureReasonCodeWITHDRAWALTEMPORARILYUNAVAILABLE               = "WITHDRAWAL_TEMPORARILY_UNAVAILABLE"
	WithdrawalPixDestinationKeyTypeCNPJ                                       = "CNPJ"
	WithdrawalPixDestinationKeyTypeEMAIL                                      = "EMAIL"
	WithdrawalPixDestinationKeyTypeEVP                                        = "EVP"
	WithdrawalPixDestinationKeyTypePHONE                                      = "PHONE"
	WithdrawalStatusCANCELED                                                  = "CANCELED"
	WithdrawalStatusCOMPLETED                                                 = "COMPLETED"
	WithdrawalStatusFAILED                                                    = "FAILED"
	WithdrawalStatusPENDING                                                   = "PENDING"
	WithdrawalStatusPROCESSING                                                = "PROCESSING"
	WithdrawalStatusUNKNOWN                                                   = "UNKNOWN"
)

These constants preserve the environment and enum wire values published by the API.

View Source
const DefaultBaseURL = "https://api.raims.com"

DefaultBaseURL is the origin of the Raims public API.

View Source
const DefaultWebhookTolerance = 5 * time.Minute

DefaultWebhookTolerance is the allowed difference from the signing timestamp.

View Source
const Version = "0.1.2"

Version identifies this SDK in the HTTP User-Agent.

Variables

This section is empty.

Functions

func ConstructWebhookEvent

func ConstructWebhookEvent(payload []byte, headers http.Header, secret string, tolerance time.Duration, now time.Time) (map[string]json.RawMessage, error)

ConstructWebhookEvent authenticates the original body before decoding its JSON object. Raw values preserve exact integers and unknown event fields.

func VerifyWebhookSignature

func VerifyWebhookSignature(payload []byte, headers http.Header, secret string, tolerance time.Duration, now time.Time) error

VerifyWebhookSignature authenticates the original HTTP body bytes. A zero now uses the current time. Zero tolerance requires the same Unix second; it does not disable timestamp verification. Headers must occur exactly once. The caller must also check the event environment and durably deduplicate its ID.

Types

type APIError

type APIError struct {
	// StatusCode is the failed HTTP status.
	StatusCode int
	// Code is the structured API code, or empty when no valid error envelope was received.
	Code string
	// Detail contains the structured error when the response envelope is valid.
	Detail *Error
	// Response contains the received HTTP metadata.
	Response *Response
}

APIError is a non-success HTTP response. Inspect Code and Detail for handling. Error intentionally excludes response payloads and messages from logs.

func (*APIError) Error

func (e *APIError) Error() string

Error returns the HTTP failure status without including response payloads.

type AccountContext

type AccountContext struct {
	Resource `json:"-"`
	// CompanyID Identificador público da empresa na Raims.
	CompanyID string `json:"company_id"`
	// CompanyName Nome empresarial da conta, ou null quando não disponível.
	CompanyName *string `json:"company_name"`
	// CompanyStatus Situação cadastral da empresa na Raims. As condições de cada operação continuam sendo verificadas na requisição.
	CompanyStatus string `json:"company_status"`
	// DataEnvironment Ambiente dos recursos acessados pela chave usada nesta consulta.
	DataEnvironment string `json:"data_environment"`
	// CheckedAt Instante da consulta, em segundos Unix UTC.
	CheckedAt int64 `json:"checked_at"`
	// AccessRevision Revisão do contexto consultado. Compare-a com outra resposta para reconhecer alterações de identidade, situação ou acesso. Não é uma autorização para executar operações.
	AccessRevision string `json:"access_revision"`
	// Currency Moeda dos valores financeiros em reais.
	Currency string `json:"currency"`
	// AmountUnit Unidade dos valores monetários inteiros: cents representa centavos de real.
	AmountUnit string `json:"amount_unit"`
	// TimestampUnit Formato dos instantes: unix_seconds representa segundos Unix UTC.
	TimestampUnit string `json:"timestamp_unit"`
	// BusinessTimezone Fuso usado nas datas e janelas de negócio da conta.
	BusinessTimezone string `json:"business_timezone"`
}

AccountContext Identidade e referências de interpretação da conta autenticada. Não inclui credenciais, dados bancários ou identidade de usuário.

func (AccountContext) MarshalJSON

func (v AccountContext) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*AccountContext) UnmarshalJSON

func (v *AccountContext) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public AccountContext response.

type AccountFee

type AccountFee struct {
	Resource `json:"-"`
	// PercentageRate Percentual da tarifa. Por exemplo, 0.8 representa 0,8%. Retorna null quando não houver parcela percentual informada.
	PercentageRate *json.Number `json:"percentage_rate"`
	// FixedFeeCents Parcela fixa da tarifa, em centavos de real. Por exemplo, 85 representa R$ 0,85. Retorna null quando não houver parcela fixa informada.
	FixedFeeCents *int64 `json:"fixed_fee_cents"`
	// MinimumFeeCents Valor mínimo da tarifa, em centavos de real, ou null quando não houver mínimo informado.
	MinimumFeeCents *int64 `json:"minimum_fee_cents"`
	// MaximumFeeCents Valor máximo da tarifa, em centavos de real, ou null quando não houver máximo informado.
	MaximumFeeCents *int64 `json:"maximum_fee_cents"`
}

AccountFee Componentes da tarifa vigente. As parcelas percentual e fixa podem estar presentes na mesma condição comercial.

func (AccountFee) MarshalJSON

func (v AccountFee) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*AccountFee) UnmarshalJSON

func (v *AccountFee) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public AccountFee response.

type AccountFees

type AccountFees struct {
	Resource `json:"-"`
	// Pix Condições vigentes para Pix, ou null quando não houver regra vigente para o plano selecionado.
	Pix *AccountFee `json:"pix"`
	// Boleto Condições vigentes para boleto, ou null quando não houver regra vigente para o plano selecionado.
	Boleto *AccountFee `json:"boleto"`
}

AccountFees Condições comerciais atuais da empresa. A consulta não altera o plano e não informa tarifas aplicadas a pagamentos anteriores.

func (AccountFees) MarshalJSON

func (v AccountFees) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*AccountFees) UnmarshalJSON

func (v *AccountFees) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public AccountFees response.

type AccountNumber

type AccountNumber struct {
	Resource `json:"-"`
	// Agency Agência da conta financeira, preservando os zeros à esquerda.
	Agency string `json:"agency"`
	// Account Número da conta financeira conforme o cadastro, preservando os zeros à esquerda e a formatação retornada.
	Account string `json:"account"`
}

AccountNumber Dados da conta financeira da própria empresa na Raims. A consulta não cadastra uma conta nem altera o destino dos saques.

func (AccountNumber) MarshalJSON

func (v AccountNumber) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*AccountNumber) UnmarshalJSON

func (v *AccountNumber) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public AccountNumber response.

type AccountsService

type AccountsService struct {
	// contains filtered or unexported fields
}

AccountsService provides the endpoints available through Client.Accounts.

func (*AccountsService) CreateCheckoutFaviconUpload

func (s *AccountsService) CreateCheckoutFaviconUpload(ctx context.Context, params *CreateCheckoutFaviconUploadParams, options ...RequestOption) (*CheckoutAssetUpload, error)

CreateCheckoutFaviconUpload Preparar envio do ícone

func (*AccountsService) CreateCheckoutLogoUpload

func (s *AccountsService) CreateCheckoutLogoUpload(ctx context.Context, params *CreateCheckoutLogoUploadParams, options ...RequestOption) (*CheckoutAssetUpload, error)

CreateCheckoutLogoUpload Preparar envio da logo

func (*AccountsService) DeleteCheckoutAssetUpload

func (s *AccountsService) DeleteCheckoutAssetUpload(ctx context.Context, id string, options ...RequestOption) (*CheckoutAssetUploadDeleted, error)

DeleteCheckoutAssetUpload Descartar envio de imagem

func (*AccountsService) GetCheckoutSettings

func (s *AccountsService) GetCheckoutSettings(ctx context.Context, options ...RequestOption) (*CheckoutSettings, error)

GetCheckoutSettings Consultar personalização do checkout

func (*AccountsService) GetContext

func (s *AccountsService) GetContext(ctx context.Context, options ...RequestOption) (*AccountContext, error)

GetContext Consultar contexto da conta

func (*AccountsService) GetFees

func (s *AccountsService) GetFees(ctx context.Context, options ...RequestOption) (*AccountFees, error)

GetFees Consultar tarifas da conta

func (*AccountsService) GetNumber

func (s *AccountsService) GetNumber(ctx context.Context, options ...RequestOption) (*AccountNumber, error)

GetNumber Recuperar número de conta

func (*AccountsService) UpdateCheckoutSettings

func (s *AccountsService) UpdateCheckoutSettings(ctx context.Context, params *UpdateCheckoutSettingsParams, options ...RequestOption) (*CheckoutSettings, error)

UpdateCheckoutSettings Atualizar personalização do checkout

type AutomaticWithdrawalSettings

type AutomaticWithdrawalSettings struct {
	Resource `json:"-"`
	// Enabled Indica se a tentativa diária de saque está ativa.
	Enabled bool `json:"enabled"`
	// MinimumAmountCents Saldo mínimo para tentar o saque, em centavos de real. O valor retirado depende do saldo disponível e do limite Pix restante.
	MinimumAmountCents int64 `json:"minimum_amount_cents"`
	// Time Horário diário no formato HH:mm, pelo fuso de São Paulo.
	Time string `json:"time"`
	// NextExecutionAt Próxima tentativa prevista, em segundos Unix UTC, ou null quando não houver uma programada. Esse instante não confirma uma transferência.
	NextExecutionAt *int64 `json:"next_execution_at"`
}

AutomaticWithdrawalSettings Configuração da tentativa diária de saque para o destino próprio da empresa.

func (AutomaticWithdrawalSettings) MarshalJSON

func (v AutomaticWithdrawalSettings) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*AutomaticWithdrawalSettings) UnmarshalJSON

func (v *AutomaticWithdrawalSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public AutomaticWithdrawalSettings response.

type Balance

type Balance struct {
	Resource `json:"-"`
	// TotalAmountCents Saldo total atual, em centavos de real, incluindo a parcela bloqueada. Pode ser negativo quando houver débitos superiores ao saldo.
	TotalAmountCents int64 `json:"total_amount_cents"`
	// BlockedAmountCents Parcela do saldo bloqueada, em centavos de real.
	BlockedAmountCents int64 `json:"blocked_amount_cents"`
	// AvailableAmountCents Saldo total menos o bloqueado, em centavos de real, com mínimo de zero. A realização de saques e estornos também depende das regras de cada recurso.
	AvailableAmountCents int64 `json:"available_amount_cents"`
}

Balance Valores atuais da conta, separados entre total, bloqueado e disponível.

func (Balance) MarshalJSON

func (v Balance) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Balance) UnmarshalJSON

func (v *Balance) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Balance response.

type BalanceForecast

type BalanceForecast struct {
	Resource `json:"-"`
	// Period Período consultado, incluindo hoje e os dias anteriores conforme a opção.
	Period string `json:"period"`
	// StartAt Início incluído do período, em segundos Unix UTC.
	StartAt int64 `json:"start_at"`
	// EndAt Fim excluído do período, em segundos Unix UTC.
	EndAt int64 `json:"end_at"`
	// ForecastDate Dia de referência da estimativa: meia-noite de hoje em São Paulo, em segundos Unix UTC.
	ForecastDate int64 `json:"forecast_date"`
	// ReceivableAmountCents Valor dos pagamentos ainda considerados previstos para recebimento no período, em centavos de real. Não inclui cobranças abertas por vencer.
	ReceivableAmountCents int64 `json:"receivable_amount_cents"`
	// ProjectedBalanceCents Soma do saldo total atual com os recebimentos previstos, em centavos de real. Pode incluir valores bloqueados; não representa saldo disponível para saque.
	ProjectedBalanceCents int64 `json:"projected_balance_cents"`
	// UpdatedAt Última atualização dos dados da previsão, em segundos Unix UTC, ou null quando não estiver disponível.
	UpdatedAt *int64 `json:"updated_at"`
}

BalanceForecast Estimativa financeira do período. Os valores não comprovam liquidação bancária nem disponibilidade para saque.

func (BalanceForecast) MarshalJSON

func (v BalanceForecast) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*BalanceForecast) UnmarshalJSON

func (v *BalanceForecast) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public BalanceForecast response.

type BalancesService

type BalancesService struct {
	// contains filtered or unexported fields
}

BalancesService provides the endpoints available through Client.Balances.

func (*BalancesService) Forecast

Forecast Consultar recebimentos previstos

func (*BalancesService) Get

func (s *BalancesService) Get(ctx context.Context, options ...RequestOption) (*Balance, error)

Get Recuperar saldo atual

type Charge

type Charge struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança.
	ID string `json:"id"`
	// CustomerID Identificador público do cliente vinculado.
	CustomerID string `json:"customer_id"`
	// AmountCents Valor da cobrança em centavos de real.
	AmountCents int64 `json:"amount_cents"`
	// PaymentMethod Meio de pagamento da cobrança: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. O valor 0 pode mudar para 1 ou 2 quando o Pix ou boleto é gerado no checkout. A escolha do checkout aparece separadamente em checkout_payment_method.
	PaymentMethod int64 `json:"payment_method"`
	// CheckoutPaymentMethod Meio de pagamento informado pelo checkout: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. null quando essa informação ainda não estiver disponível. A seleção de uma opção na tela não confirma a geração do pagamento nem que a cobrança foi paga.
	CheckoutPaymentMethod *int64 `json:"checkout_payment_method"`
	// DueDate Vencimento da cobrança em segundos Unix UTC.
	DueDate int64 `json:"due_date"`
	// Title Título da cobrança, ou null quando não informado.
	Title *string `json:"title"`
	// Description Descrição da cobrança, ou null quando não informada.
	Description *string `json:"description"`
	// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
	Status int64 `json:"status"`
	// CreatedAt Instante de criação em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// CheckoutURL Link para o pagador abrir o checkout, ou null quando não houver link disponível.
	CheckoutURL *string `json:"checkout_url"`
	// IsPayable Indica se a cobrança pode ser paga. Os dados de Pix ou boleto ainda podem estar ausentes em payment_information; consulte status para acompanhar o pagamento.
	IsPayable bool `json:"is_payable"`
	// PaymentInformation Instruções de pagamento e resultado da emissão de Pix ou boleto. pix e boleto são null quando os dados não estão disponíveis.
	PaymentInformation ChargePaymentInformation `json:"payment_information"`
	// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
	PaymentMethodTypes *[]int64 `json:"payment_method_types"`
	// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
	ExternalReference *string `json:"external_reference"`
	// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
	Metadata map[string]string `json:"metadata"`
}

Charge contains the fields defined by the public API.

func (Charge) MarshalJSON

func (v Charge) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Charge) UnmarshalJSON

func (v *Charge) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Charge response.

type ChargeBoletoCompensation

type ChargeBoletoCompensation struct {
	Resource `json:"-"`
	// ChargeID ID público da cobrança simulada. Use o mesmo identificador ao consultar os resultados.
	ChargeID string `json:"charge_id"`
	// Status Estado da cobrança enquanto o boleto aguarda liquidação. A compensação não equivale a status pago.
	Status int64 `json:"status"`
	// AmountCents Valor do boleto em centavos de real. Informar esse valor não confirma crédito no saldo.
	AmountCents int64 `json:"amount_cents"`
	// Duplicate Indica que a cobrança já tinha o mesmo resultado. Nesse caso, a simulação não repete o efeito financeiro.
	Duplicate bool `json:"duplicate"`
}

ChargeBoletoCompensation Resultado da compensação simulada do boleto, sem confirmação de crédito.

func (ChargeBoletoCompensation) MarshalJSON

func (v ChargeBoletoCompensation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeBoletoCompensation) UnmarshalJSON

func (v *ChargeBoletoCompensation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeBoletoCompensation response.

type ChargeBoletoPaymentInformation

type ChargeBoletoPaymentInformation struct {
	Resource `json:"-"`
	// LineDigits Linha digitável de 47 dígitos do boleto emitido.
	LineDigits string `json:"line_digits"`
	// Barcode Código de barras de 44 dígitos do boleto emitido.
	Barcode string `json:"barcode"`
	// DueDate Vencimento do boleto em segundos Unix UTC.
	DueDate int64 `json:"due_date"`
}

ChargeBoletoPaymentInformation contains the fields defined by the public API.

func (ChargeBoletoPaymentInformation) MarshalJSON

func (v ChargeBoletoPaymentInformation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeBoletoPaymentInformation) UnmarshalJSON

func (v *ChargeBoletoPaymentInformation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeBoletoPaymentInformation response.

type ChargeCreated

type ChargeCreated struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança criada.
	ID string `json:"id"`
	// CustomerID Identificador público do cliente vinculado.
	CustomerID string `json:"customer_id"`
	// AmountCents Valor da cobrança em centavos de real.
	AmountCents int64 `json:"amount_cents"`
	// PaymentMethod Meio da cobrança. Com lista própria, retorna 0 até a emissão do pagamento. Sem lista, 1 solicita Pix direto e 2 solicita boleto direto. A lista de meios permanece separada da escolha registrada.
	PaymentMethod int64 `json:"payment_method"`
	// DueDate Vencimento da cobrança em segundos Unix UTC.
	DueDate int64 `json:"due_date"`
	// Title Título da cobrança, ou null quando não informado.
	Title *string `json:"title"`
	// Description Descrição da cobrança, ou null quando não informada.
	Description *string `json:"description"`
	// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
	Status int64 `json:"status"`
	// CreatedAt Instante de criação em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// CheckoutURL Link para o pagador abrir o checkout. É retornado quando create_checkout ou send_email é true, ou uma URL de retorno é informada; nos demais casos, é null. O link não comprova pagamento nem entrega de e-mail.
	CheckoutURL *string `json:"checkout_url"`
	// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
	PaymentMethodTypes *[]int64 `json:"payment_method_types"`
	// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
	ExternalReference *string `json:"external_reference"`
	// PaymentInformation Instruções de pagamento e resultado da emissão de Pix ou boleto. Sem lista própria, payment_method 1 solicita Pix e 2 solicita boleto. Confira pix_status ou boleto_status e os dados do meio solicitado.
	PaymentInformation ChargePaymentInformation `json:"payment_information"`
	// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
	Metadata map[string]string `json:"metadata"`
}

ChargeCreated contains the fields defined by the public API.

func (ChargeCreated) MarshalJSON

func (v ChargeCreated) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeCreated) UnmarshalJSON

func (v *ChargeCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeCreated response.

type ChargeListItem

type ChargeListItem struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança.
	ID string `json:"id"`
	// CustomerID Identificador público do cliente vinculado.
	CustomerID string `json:"customer_id"`
	// AmountCents Valor da cobrança em centavos de real.
	AmountCents int64 `json:"amount_cents"`
	// PaymentMethod Meio de pagamento da cobrança: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. O valor 0 pode mudar para 1 ou 2 quando o Pix ou boleto é gerado no checkout. A escolha do checkout aparece separadamente em checkout_payment_method.
	PaymentMethod int64 `json:"payment_method"`
	// CheckoutPaymentMethod Meio de pagamento informado pelo checkout: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. null quando essa informação ainda não estiver disponível. A seleção de uma opção na tela não confirma a geração do pagamento nem que a cobrança foi paga.
	CheckoutPaymentMethod *int64 `json:"checkout_payment_method"`
	// DueDate Vencimento da cobrança em segundos Unix UTC.
	DueDate int64 `json:"due_date"`
	// Title Título da cobrança, ou null quando não informado.
	Title *string `json:"title"`
	// Description Descrição da cobrança, ou null quando não informada.
	Description *string `json:"description"`
	// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
	Status int64 `json:"status"`
	// CreatedAt Instante de criação em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// CheckoutURL Link para o pagador abrir o checkout, ou null quando não houver link disponível.
	CheckoutURL *string `json:"checkout_url"`
	// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
	PaymentMethodTypes *[]int64 `json:"payment_method_types"`
	// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
	ExternalReference *string `json:"external_reference"`
	// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
	Metadata map[string]string `json:"metadata"`
}

ChargeListItem contains the fields defined by the public API.

func (ChargeListItem) MarshalJSON

func (v ChargeListItem) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeListItem) UnmarshalJSON

func (v *ChargeListItem) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeListItem response.

type ChargeListPage

type ChargeListPage struct {
	Resource `json:"-"`
	// PageSize Tamanho de página aplicado à consulta.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há cobranças na próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há cobranças na página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para continuar com after; null quando não há próxima página.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para voltar com before; null quando não há página anterior.
	PreviousBefore *string `json:"previous_before"`
}

ChargeListPage contains the fields defined by the public API.

func (ChargeListPage) MarshalJSON

func (v ChargeListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeListPage) UnmarshalJSON

func (v *ChargeListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeListPage response.

type ChargeListResponse

type ChargeListResponse struct {
	Resource `json:"-"`
	// List Cobranças encontradas na empresa e no ambiente autenticado.
	List []ChargeListItem `json:"list"`
	// Page Informações para continuar ou voltar na listagem.
	Page ChargeListPage `json:"page"`
}

ChargeListResponse contains the fields defined by the public API.

func (ChargeListResponse) MarshalJSON

func (v ChargeListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*ChargeListResponse) PreviousPage

func (v *ChargeListResponse) PreviousPage(ctx context.Context) (*ChargeListResponse, error)

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*ChargeListResponse) UnmarshalJSON

func (v *ChargeListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeListResponse response.

type ChargePaymentInformation

type ChargePaymentInformation struct {
	Resource `json:"-"`
	// Pix Dados do Pix para pagamento, ou null quando não disponíveis.
	Pix *ChargePixPaymentInformation `json:"pix"`
	// Boleto Dados do boleto para pagamento, ou null quando não disponíveis.
	Boleto *ChargeBoletoPaymentInformation `json:"boleto"`
	// PixStatus Resultado da emissão do Pix: not_generated quando não há emissão disponível ou solicitada; available quando os dados estão disponíveis; pending enquanto não há resultado confirmado; failed quando não foi possível emitir.
	PixStatus string `json:"pix_status"`
	// PixError Motivo da pendência ou da falha de emissão do Pix, ou null. Guarde o ID da cobrança e use a consulta individual para acompanhar. Se a condição persistir, entre em contato com o suporte; não repita a criação para tentar emitir o Pix.
	PixError *Error `json:"pix_error"`
	// BoletoStatus Resultado da emissão do boleto: not_generated quando não há emissão disponível ou solicitada; available quando os dados estão disponíveis; pending enquanto não há resultado confirmado; failed quando não foi possível emitir.
	BoletoStatus string `json:"boleto_status"`
	// BoletoError Motivo da pendência ou da falha de emissão do boleto, ou null. Guarde o ID da cobrança e use a consulta individual para acompanhar. Se a condição persistir, entre em contato com o suporte; não repita a criação para tentar emitir o boleto.
	BoletoError *Error `json:"boleto_error"`
	// BoletoPaymentStatus Andamento do pagamento do boleto: awaiting_payment aguarda pagamento, compensated aguarda liquidação e settled confirma a liquidação. Null quando não há andamento disponível. A compensação ainda não representa crédito disponível.
	BoletoPaymentStatus *string `json:"boleto_payment_status"`
}

ChargePaymentInformation contains the fields defined by the public API.

func (ChargePaymentInformation) MarshalJSON

func (v ChargePaymentInformation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargePaymentInformation) UnmarshalJSON

func (v *ChargePaymentInformation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargePaymentInformation response.

type ChargePixPaymentInformation

type ChargePixPaymentInformation struct {
	Resource `json:"-"`
	// CopyPaste Código Pix copia e cola para pagar a cobrança.
	CopyPaste string `json:"copy_paste"`
	// ExpiresAt Expiração do código Pix em segundos Unix UTC.
	ExpiresAt int64 `json:"expires_at"`
	// QrCodeBase64 Imagem PNG do QR Code em Base64, sem prefixo de data URI. Para exibir no navegador, acrescente data:image/png;base64, antes do valor.
	QrCodeBase64 string `json:"qr_code_base64"`
}

ChargePixPaymentInformation contains the fields defined by the public API.

func (ChargePixPaymentInformation) MarshalJSON

func (v ChargePixPaymentInformation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargePixPaymentInformation) UnmarshalJSON

func (v *ChargePixPaymentInformation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargePixPaymentInformation response.

type ChargeRevocationPending

type ChargeRevocationPending struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança.
	ID string `json:"id"`
	// Status Status atual da cobrança, considerando o vencimento.
	Status int64 `json:"status"`
	// Revoked Indica que a revogação foi confirmada.
	Revoked bool `json:"revoked"`
	// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
	RevocationPending bool `json:"revocation_pending"`
}

ChargeRevocationPending contains the fields defined by the public API.

func (ChargeRevocationPending) MarshalJSON

func (v ChargeRevocationPending) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeRevocationPending) UnmarshalJSON

func (v *ChargeRevocationPending) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeRevocationPending response.

type ChargeRevoked

type ChargeRevoked struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança.
	ID string `json:"id"`
	// Status Estado atual da cobrança, considerando o vencimento.
	Status int64 `json:"status"`
	// Revoked Indica que a revogação foi confirmada.
	Revoked bool `json:"revoked"`
	// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
	RevocationPending bool `json:"revocation_pending"`
}

ChargeRevoked contains the fields defined by the public API.

func (ChargeRevoked) MarshalJSON

func (v ChargeRevoked) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeRevoked) UnmarshalJSON

func (v *ChargeRevoked) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeRevoked response.

type ChargeScenario

type ChargeScenario struct {
	Resource `json:"-"`
	// ChargeID Identificador público da cobrança do Sandbox.
	ChargeID string `json:"charge_id"`
	// Action Ação do cenário: emissão de Pix, emissão de boleto ou cancelamento.
	Action string `json:"action"`
	// Outcome Resultado escolhido para a ação: pending, failed ou completed.
	Outcome string `json:"outcome"`
	// State Andamento do cenário: configured aguarda a ação; pending aguarda resolução; failed e completed são resultados finais.
	State string `json:"state"`
	// ChargeStatus Estado atual da cobrança, conforme os códigos do recurso Cobranças.
	ChargeStatus int64 `json:"charge_status"`
	// Duplicate Indica que o mesmo resultado já estava registrado, sem repetir a ação.
	Duplicate bool `json:"duplicate"`
}

ChargeScenario Resultado da configuração ou resolução de um cenário do Sandbox.

func (ChargeScenario) MarshalJSON

func (v ChargeScenario) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeScenario) UnmarshalJSON

func (v *ChargeScenario) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeScenario response.

type ChargeScenarioParams

type ChargeScenarioParams struct {
	// Action Ação a testar: pix_issuance para emissão Pix, boleto_issuance para emissão de boleto ou cancellation para cancelamento. Para cancellation, mantenha a cobrança aberta com Pix ou boleto já emitido, sem confirmar o pagamento.
	Action Optional[string] `json:"action,omitzero"`
	// Outcome Resultado da ação: pending mantém a confirmação em aberto; failed apresenta uma falha.
	Outcome Optional[string] `json:"outcome,omitzero"`
}

ChargeScenarioParams Cenário para a próxima emissão ou cancelamento da cobrança.

type ChargeSimulation

type ChargeSimulation struct {
	Resource `json:"-"`
	// ChargeID ID público da cobrança simulada. Use o mesmo identificador ao consultar os resultados.
	ChargeID string `json:"charge_id"`
	// Status Estado registrado após a simulação: 4 corresponde a paga e 9 a falha.
	Status int64 `json:"status"`
	// AmountCents Valor da cobrança, em centavos de real. Confirmar o pagamento credita esse valor no saldo de teste uma única vez.
	AmountCents int64 `json:"amount_cents"`
	// Duplicate Indica que a cobrança já tinha o mesmo resultado. Nesse caso, a simulação não repete o efeito financeiro.
	Duplicate bool `json:"duplicate"`
}

ChargeSimulation Resultado da simulação registrada na cobrança do Sandbox. Consulte saldo e extrato nos respectivos recursos.

func (ChargeSimulation) MarshalJSON

func (v ChargeSimulation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeSimulation) UnmarshalJSON

func (v *ChargeSimulation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeSimulation response.

type ChargeStatistics

type ChargeStatistics struct {
	Resource `json:"-"`
	// Period Período considerado na consulta.
	Period string `json:"period"`
	// StartAt Início do período, incluído na consulta, em segundos Unix UTC. Corresponde à meia-noite de São Paulo no primeiro dia.
	StartAt int64 `json:"start_at"`
	// EndAt Fim do período, excluído da consulta, em segundos Unix UTC. Corresponde à meia-noite de São Paulo após o último dia.
	EndAt int64 `json:"end_at"`
	// Issued Cobranças criadas no período, independentemente do estado atual.
	Issued ChargeStatisticsAggregate `json:"issued"`
	// IssuedPaid Cobranças criadas no período que estão pagas ou devolvidas, parcial ou integralmente. O pagamento pode ter ocorrido depois da criação. Cobranças em contestação não entram neste total.
	IssuedPaid ChargeStatisticsAggregate `json:"issued_paid"`
	// Received Cobranças pagas ou devolvidas cujo pagamento ocorreu no período, mesmo que tenham sido criadas antes dele. Cobranças em contestação não entram neste total. Devoluções não são subtraídas. Não some este valor a issued_paid, pois um pagamento pode aparecer nos dois conjuntos.
	Received ChargeStatisticsAggregate `json:"received"`
	// PaymentRate Percentual de cobranças emitidas que foram pagas: issued_paid.count dividido por issued.count, multiplicado por 100. Usa até duas casas decimais e retorna zero quando não há cobranças emitidas.
	PaymentRate json.Number `json:"payment_rate"`
	// UpdatedAt Última atualização conhecida dos totais consultados, em segundos Unix UTC, ou null quando essa informação não estiver disponível.
	UpdatedAt *int64 `json:"updated_at"`
}

ChargeStatistics Estatísticas de emissão e recebimento de cobranças no período. Cobranças canceladas permanecem no total emitido; cadastros excluídos não entram nos totais.

func (ChargeStatistics) MarshalJSON

func (v ChargeStatistics) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeStatistics) UnmarshalJSON

func (v *ChargeStatistics) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeStatistics response.

type ChargeStatisticsAggregate

type ChargeStatisticsAggregate struct {
	Resource `json:"-"`
	// Count Quantidade de cobranças no conjunto.
	Count int64 `json:"count"`
	// AmountCents Soma dos valores das cobranças, em centavos de real, sem descontar tarifas ou devoluções.
	AmountCents int64 `json:"amount_cents"`
}

ChargeStatisticsAggregate Quantidade de cobranças e soma dos seus valores brutos.

func (ChargeStatisticsAggregate) MarshalJSON

func (v ChargeStatisticsAggregate) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ChargeStatisticsAggregate) UnmarshalJSON

func (v *ChargeStatisticsAggregate) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ChargeStatisticsAggregate response.

type ChargesService

type ChargesService struct {
	// contains filtered or unexported fields
}

ChargesService provides the endpoints available through Client.Charges.

func (*ChargesService) Create

func (s *ChargesService) Create(ctx context.Context, params *CreateChargeParams, options ...RequestOption) (*ChargeCreated, error)

Create Criar nova cobrança

func (*ChargesService) CreateRefund

func (s *ChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, options ...RequestOption) (*Refund, error)

CreateRefund Solicitar estorno

func (*ChargesService) Get

func (s *ChargesService) Get(ctx context.Context, id string, options ...RequestOption) (*Charge, error)

Get Recuperar uma única cobrança

func (*ChargesService) GetBoleto

func (s *ChargesService) GetBoleto(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)

GetBoleto Baixar boleto

func (*ChargesService) GetPayment

func (s *ChargesService) GetPayment(ctx context.Context, id string, options ...RequestOption) (*PaymentReceipt, error)

GetPayment Consultar dados do pagamento

func (*ChargesService) GetReceipt

func (s *ChargesService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)

GetReceipt Baixar recibo de pagamento

func (*ChargesService) GetRefundEligibility

func (s *ChargesService) GetRefundEligibility(ctx context.Context, id string, options ...RequestOption) (*RefundEligibility, error)

GetRefundEligibility Consultar elegibilidade para estorno

func (*ChargesService) List

List Listar cobranças

func (*ChargesService) ListAll

func (s *ChargesService) ListAll(ctx context.Context, params *ListChargesParams, options ...RequestOption) *Iterator[ChargeListItem]

ListAll lazily follows forward cursors and preserves the original filters.

func (*ChargesService) ListRefunds

func (s *ChargesService) ListRefunds(ctx context.Context, id string, params *ListChargeRefundsParams, options ...RequestOption) (*RefundListResponse, error)

ListRefunds Listar estornos de uma cobrança

func (*ChargesService) ListRefundsAll

func (s *ChargesService) ListRefundsAll(ctx context.Context, id string, params *ListChargeRefundsParams, options ...RequestOption) *Iterator[Refund]

ListRefundsAll lazily follows forward cursors and preserves the original filters.

func (*ChargesService) Revoke

func (s *ChargesService) Revoke(ctx context.Context, id string, options ...RequestOption) (*RevokeChargeResult, error)

Revoke Revogar cobrança

func (*ChargesService) Statistics

func (s *ChargesService) Statistics(ctx context.Context, params *GetChargeStatisticsParams, options ...RequestOption) (*ChargeStatistics, error)

Statistics Consultar estatísticas de cobranças

func (*ChargesService) Update

func (s *ChargesService) Update(ctx context.Context, id string, params *UpdateChargeParams, options ...RequestOption) (*Charge, error)

Update Atualizar cobrança existente

type CheckoutAsset

type CheckoutAsset struct {
	Resource `json:"-"`
	// URL Endereço da imagem atual, ou null quando não houver imagem disponível. Durante uma troca pendente ou com falha, conserva a imagem anterior, quando existir.
	URL *string `json:"url"`
	// Status Situação da imagem: absent quando não há imagem configurada; ready quando está disponível; pending durante o processamento; failed quando a alteração não pôde ser aplicada.
	Status string `json:"status"`
	// ErrorCode Código público da falha na aplicação da imagem, ou null quando não houver falha.
	ErrorCode *string `json:"error_code"`
}

CheckoutAsset Endereço da imagem atual e andamento da última alteração solicitada.

func (CheckoutAsset) MarshalJSON

func (v CheckoutAsset) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CheckoutAsset) UnmarshalJSON

func (v *CheckoutAsset) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CheckoutAsset response.

type CheckoutAssetUpload

type CheckoutAssetUpload struct {
	Resource `json:"-"`
	// ID Identificador do envio. Use-o no campo correspondente do PATCH depois de enviar o arquivo.
	ID string `json:"id"`
	// UploadURL URL temporária para envio dos bytes do arquivo. Não envie a chave de API Raims para este endereço.
	UploadURL string `json:"upload_url"`
	// Method Método HTTP para enviar o arquivo à URL retornada.
	Method string `json:"method"`
	// ContentType Tipo de conteúdo que deve ser enviado no header Content-Type do PUT.
	ContentType string `json:"content_type"`
	// FileSize Quantidade de bytes que deve ser enviada, também informada no header Content-Length do PUT.
	FileSize int64 `json:"file_size"`
	// ExpiresAt Prazo de validade da autorização de envio, em segundos Unix UTC.
	ExpiresAt int64 `json:"expires_at"`
}

CheckoutAssetUpload Autorização temporária para enviar um arquivo de imagem da empresa, no ambiente autenticado.

func (CheckoutAssetUpload) MarshalJSON

func (v CheckoutAssetUpload) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CheckoutAssetUpload) UnmarshalJSON

func (v *CheckoutAssetUpload) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CheckoutAssetUpload response.

type CheckoutAssetUploadDeleted

type CheckoutAssetUploadDeleted struct {
	Resource `json:"-"`
	// ID Identificador do envio descartado.
	ID string `json:"id"`
	// Deleted Confirma que o envio foi descartado e não pode mais ser associado ao checkout.
	Deleted bool `json:"deleted"`
}

CheckoutAssetUploadDeleted Confirmação do descarte de um envio de imagem que não será aplicado.

func (CheckoutAssetUploadDeleted) MarshalJSON

func (v CheckoutAssetUploadDeleted) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CheckoutAssetUploadDeleted) UnmarshalJSON

func (v *CheckoutAssetUploadDeleted) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CheckoutAssetUploadDeleted response.

type CheckoutSettings

type CheckoutSettings struct {
	Resource `json:"-"`
	// SupportEmail E-mail de suporte apresentado no checkout, ou null quando não informado.
	SupportEmail *string `json:"support_email"`
	// HexPrimaryColor Cor principal do checkout no formato #RRGGBB.
	HexPrimaryColor string `json:"hex_primary_color"`
	// HexSecondaryColor Cor de fundo do checkout no formato #RRGGBB.
	HexSecondaryColor string `json:"hex_secondary_color"`
	// PaymentMethodTypes Meios padrão habilitados e disponíveis: 1 para Pix e 2 para boleto. Cobranças e links podem ter configurações próprias. Para alterar o padrão, use o Dashboard.
	PaymentMethodTypes []int64 `json:"payment_method_types"`
	Logo CheckoutAsset `json:"logo"`
	// Favicon Imagem atual e andamento da última alteração.
	Favicon CheckoutAsset `json:"favicon"`
}

CheckoutSettings Imagens, cores, contato de suporte e meios padrão do checkout no ambiente autenticado.

func (CheckoutSettings) MarshalJSON

func (v CheckoutSettings) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CheckoutSettings) UnmarshalJSON

func (v *CheckoutSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CheckoutSettings response.

type Client

type Client struct {
	// Accounts provides account context, fees and checkout settings.
	Accounts *AccountsService
	// Balances provides the account balance and forecast.
	Balances *BalancesService
	// Charges provides charges, payments, documents and charge refunds.
	Charges *ChargesService
	// Customers provides customer registration and retrieval.
	Customers *CustomersService
	// Disputes provides dispute retrieval and listing.
	Disputes *DisputesService
	// PaymentLinks provides payment links and requests to send them by email.
	PaymentLinks *PaymentLinksService
	// Refunds provides refund retrieval, listing and receipts.
	Refunds *RefundsService
	// Statements provides financial statement entries.
	Statements *StatementsService
	// WebhookEventTypes lists the event types available for webhook subscriptions.
	WebhookEventTypes *WebhookEventTypesService
	// Webhooks provides webhook subscriptions, health, pause, tests and secret rotation.
	Webhooks *WebhooksService
	// WithdrawalDestinations provides the configured withdrawal destinations.
	WithdrawalDestinations *WithdrawalDestinationsService
	// Withdrawals provides withdrawals, limits, summaries and automatic settings.
	Withdrawals *WithdrawalsService
	// Simulations provides charge and refund simulations in Sandbox.
	Simulations *SimulationsService
	// contains filtered or unexported fields
}

Client is reusable by concurrent goroutines. Its configuration is immutable.

func NewClient

func NewClient(apiKey string, options ...ClientOption) (*Client, error)

NewClient creates a client authenticated with an API key. The key defines its environment.

func NewOAuthClient

func NewOAuthClient(accessToken string, environment Environment, authorized []Environment, options ...ClientOption) (*Client, error)

NewOAuthClient uses an access token obtained by the application's OAuth flow. The caller supplies the environments granted by the connection. The SDK does not renew tokens.

func (*Client) CloseIdleConnections

func (c *Client) CloseIdleConnections()

CloseIdleConnections closes idle connections in the client's transport. Active requests continue. A shared transport also closes its other idle connections.

func (*Client) GoString

func (c *Client) GoString() string

GoString returns a client identifier for Go formatting without exposing its credential.

func (*Client) String

func (c *Client) String() string

String returns a client identifier without exposing its credential.

type ClientOption

type ClientOption func(*clientConfig) error

ClientOption configures a client through one of the With helpers. Options are applied and validated when the client is constructed.

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL sets a trusted HTTPS origin receiving the credential. An HTTP loopback IP is also accepted for local validation. Paths, queries, fragments and credentials in the URL are rejected during construction.

func WithHTTPClient

func WithHTTPClient(client *http.Client) ClientOption

WithHTTPClient copies the supplied HTTP client configuration and shares its transport. The SDK refuses redirects and disables cookies. The transport must respect request contexts and preserve the single-send policy for writes.

func WithMaxNetworkRetries

func WithMaxNetworkRetries(retries int) ClientOption

WithMaxNetworkRetries sets zero to five additional GET attempts; the default is zero. Eligible failures are connection errors and HTTP 408, 429, 500, 502, 503 and 504. Writes are never retried, including when an idempotency key is supplied.

func WithRequestObserver

func WithRequestObserver(observer func(RequestDiagnostics)) ClientOption

WithRequestObserver registers a synchronous callback after each transport attempt. The callback must return promptly and support concurrent calls. A nil callback disables observation. Its panic or duration does not discard a conclusive response.

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

WithTimeout sets the positive timeout of each HTTP attempt, including body reads. The default is 80 seconds. A context deadline can limit the entire call, including retries and backoff; WithRequestTimeout overrides an individual call.

type ConnectionError

type ConnectionError struct {
	// contains filtered or unexported fields
}

ConnectionError indicates that no conclusive response was received. A write may already have been processed. Unwrap supports errors.Is.

func (*ConnectionError) Error

func (e *ConnectionError) Error() string

Error describes the connection failure without including the request URL or payload.

func (*ConnectionError) Unwrap

func (e *ConnectionError) Unwrap() error

Unwrap exposes the cause for errors.Is and errors.As, including context deadlines. Inspect the underlying error before logging it because it may contain request details.

type CreateChargeParams

type CreateChargeParams struct {
	// CustomerID ID de um cliente da empresa e do ambiente autenticado. Copie o id retornado no cadastro ou na consulta. Pix direto exige CPF/CNPJ válido. Boleto direto exige nome, e-mail válido, CPF/CNPJ e endereço, incluindo CEP e número; complete esses dados no cadastro do cliente.
	CustomerID Optional[string] `json:"customer_id,omitzero"`
	// AmountCents Valor da cobrança em centavos de real. Por exemplo, 10000 representa R$ 100,00.
	AmountCents Optional[int64] `json:"amount_cents,omitzero"`
	// PaymentMethod Meio da cobrança. Omitir ou enviar 0 permite escolher no checkout. Sem payment_method_types, 1 solicita Pix e 2 solicita boleto na criação, conforme os meios habilitados. Boleto usa o endereço do cliente e completa campos ausentes pelo CEP quando disponíveis. Com lista própria, envie 0 ou omita este campo; a emissão acontece após a escolha no checkout.
	PaymentMethod Optional[int64] `json:"payment_method,omitzero"`
	// DueDate Vencimento em segundos Unix UTC, pelo menos cinco minutos no futuro. A data máxima é hoje mais dez anos, no calendário de São Paulo.
	DueDate Optional[int64] `json:"due_date,omitzero"`
	// Title Título da cobrança. Você pode deixar este campo vazio.
	Title Optional[string] `json:"title,omitzero"`
	// Description Descrição da cobrança. Você pode deixar este campo vazio.
	Description Optional[string] `json:"description,omitzero"`
	// SendEmail Com true, solicita o envio da cobrança ao e-mail do cliente e gera checkout_url. Em contas pendentes, o cliente precisa ter o mesmo e-mail principal da conta. Fora dessa condição, um e-mail ausente ou inválido impede o envio, mas permite criar a cobrança quando não houver emissão direta de boleto. Boleto direto exige e-mail válido mesmo com false. A resposta não confirma a entrega da mensagem.
	SendEmail Optional[bool] `json:"send_email,omitzero"`
	// CreateCheckout Com true, gera o link retornado em checkout_url, sem exigir uma URL de retorno nem solicitar envio de e-mail. Com false, o link ainda é gerado quando send_email é true ou uma URL de retorno é informada.
	CreateCheckout Optional[bool] `json:"create_checkout,omitzero"`
	// SuccessRedirectURL URL HTTPS do seu site para retorno após a confirmação do pagamento. O redirecionamento não comprova o pagamento; consulte a cobrança para confirmá-lo. Não aceita credenciais no endereço, IP literal, localhost ou domínio Raims. Quando preenchida, gera checkout_url mesmo com send_email false. Se omitida, vazia ou null, o retorno não é definido.
	SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
	// CancelRedirectURL URL HTTPS do seu site para o pagador voltar pelo checkout. Voltar não cancela a cobrança, o Pix ou o boleto. Não aceita credenciais no endereço, IP literal, localhost ou domínio Raims. Quando preenchida, gera checkout_url mesmo com send_email false. Se omitida, vazia ou null, o retorno não é definido.
	CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
	// PaymentMethodTypes Meios permitidos para a cobrança: 1 para Pix e 2 para boleto. Omitir ou enviar null usa a configuração de checkout herdada. Informe uma lista sem repetições. A configuração própria substitui o padrão da conta; uma configuração do link pode apenas restringir essa lista. Combine com payment_method omitido ou 0.
	PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
	// ExternalReference Referência do pedido ou da cobrança no seu sistema. Null, vazio ou somente espaços deixam sem referência. Pode ser repetida e não evita cobranças duplicadas. É diferente da referência do cadastro do cliente.
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
	// Metadata Dados de integração associados à cobrança, em pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir, enviar null ou {} cria a cobrança sem esses dados; pares com valor null não são incluídos. Texto vazio é um valor válido.
	Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}

CreateChargeParams contains the fields defined by the public API.

type CreateCheckoutFaviconUploadParams

type CreateCheckoutFaviconUploadParams struct {
	// ContentType Tipo de conteúdo do arquivo: image/png ou image/jpeg.
	ContentType Optional[string] `json:"content_type,omitzero"`
	// FileSize Tamanho do arquivo em bytes.
	FileSize Optional[int64] `json:"file_size,omitzero"`
	// Width Largura do ícone em pixels. Deve ser igual à altura.
	Width Optional[int64] `json:"width,omitzero"`
	// Height Altura do ícone em pixels. Deve ser igual à largura.
	Height Optional[int64] `json:"height,omitzero"`
}

CreateCheckoutFaviconUploadParams Metadados da imagem que será enviada como ícone do checkout.

type CreateCheckoutLogoUploadParams

type CreateCheckoutLogoUploadParams struct {
	// ContentType Tipo de conteúdo do arquivo: image/png ou image/jpeg.
	ContentType Optional[string] `json:"content_type,omitzero"`
	// FileSize Tamanho do arquivo em bytes.
	FileSize Optional[int64] `json:"file_size,omitzero"`
	// Width Largura da imagem em pixels.
	Width Optional[int64] `json:"width,omitzero"`
	// Height Altura da imagem em pixels.
	Height Optional[int64] `json:"height,omitzero"`
}

CreateCheckoutLogoUploadParams Metadados da imagem que será enviada como logo do checkout.

type CreateCustomerParams

type CreateCustomerParams struct {
	// FullName Nome completo do pagador.
	FullName Optional[string] `json:"full_name,omitzero"`
	// TaxID CPF ou CNPJ válido, com ou sem pontos, barra, hífen e espaços.
	TaxID Optional[string] `json:"tax_id,omitzero"`
	// Email E-mail do pagador. Cadastrar o e-mail não envia uma mensagem.
	Email Optional[string] `json:"email,omitzero"`
	// DialCode Código de discagem internacional. Pode ser informado sem phone_local.
	DialCode Optional[string] `json:"dial_code,omitzero"`
	// PhoneLocal Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code.
	PhoneLocal Optional[string] `json:"phone_local,omitzero"`
	// ZipCode CEP do endereço, com ou sem hífen. Se street, neigh, city, uf, street_number e complement estiverem vazios, o CEP pode preencher rua, bairro, cidade e estado. O preenchimento não inclui número nem complemento.
	ZipCode Optional[string] `json:"zip_code,omitzero"`
	// Street Logradouro do endereço.
	Street Optional[string] `json:"street,omitzero"`
	// StreetNumber Número do endereço.
	StreetNumber Optional[string] `json:"street_number,omitzero"`
	// Complement Complemento do endereço.
	Complement Optional[string] `json:"complement,omitzero"`
	// Neigh Bairro do endereço.
	Neigh Optional[string] `json:"neigh,omitzero"`
	// City Cidade do endereço.
	City Optional[string] `json:"city,omitzero"`
	// Uf Sigla do estado, como SP.
	Uf Optional[string] `json:"uf,omitzero"`
	// ExternalReference Identificador do cliente no seu sistema. Para um cliente já cadastrado, omita para manter a referência ou envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
	// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
	Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}

CreateCustomerParams contains the fields defined by the public API.

type CreatePaymentLinkParams

type CreatePaymentLinkParams struct {
	// ChargeID Identificador da cobrança existente. O link utiliza o cliente, o valor e o vencimento dessa cobrança.
	ChargeID Optional[string] `json:"charge_id,omitzero"`
	// SuccessRedirectURL URL HTTPS de retorno após o pagamento confirmado. Omitir, enviar null ou texto vazio preserva a URL existente.
	SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
	// CancelRedirectURL URL HTTPS para voltar ao seu site. Esse retorno não cancela a cobrança. Omitir, enviar null ou texto vazio preserva a URL existente.
	CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
	// PaymentMethodTypes Meios permitidos no link. Omitir preserva a configuração; null remove a configuração própria. Uma lista limita os meios do checkout e não amplia os permitidos pela cobrança.
	PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
}

CreatePaymentLinkParams contains the fields defined by the public API.

type CreateRefundParams

type CreateRefundParams struct {
	// AmountCents Valor solicitado para devolução, em centavos de real. Para devolver tudo, informe o valor restante mostrado na consulta de elegibilidade.
	AmountCents Optional[int64] `json:"amount_cents,omitzero"`
	// Description Descrição da solicitação de devolução. Você pode deixar este campo vazio.
	Description Optional[string] `json:"description,omitzero"`
}

CreateRefundParams Valor explícito da devolução Pix e descrição opcional.

type CreateWebhookParams

type CreateWebhookParams struct {
	// Name Nome para identificar o destino.
	Name Optional[string] `json:"name,omitzero"`
	// URL URL HTTPS que recebe os eventos. Use a porta padrão 443 e um endereço público externo à Raims.
	URL Optional[string] `json:"url,omitzero"`
	// Events Códigos dos eventos que este destino deve receber. Consulte o catálogo de eventos disponíveis.
	Events Optional[[]string] `json:"events,omitzero"`
	// IsActive Define se o destino pode receber eventos após o cadastro.
	IsActive Optional[bool] `json:"is_active,omitzero"`
}

CreateWebhookParams Dados do webhook a cadastrar.

type CreateWithdrawalParams

type CreateWithdrawalParams struct {
	// AmountCents Valor total a retirar, em centavos de real, incluindo a tarifa. Consulte as condições de saque para conferir saldo, tarifa e limites antes de solicitar.
	AmountCents Optional[int64] `json:"amount_cents,omitzero"`
	// ExpectedDestinationID ID do destino próprio que deve continuar selecionado como padrão. Copie o id retornado na consulta dos destinos. Se o destino mudar ou deixar de ser válido, o saque é recusado. Omitir ou enviar null usa o destino padrão vigente.
	ExpectedDestinationID Optional[string] `json:"expected_destination_id,omitzero"`
}

CreateWithdrawalParams Valor total solicitado para o saque Pix. A tarifa, quando aplicável, é descontada desse valor.

type CustomerBatchDeleted

type CustomerBatchDeleted struct {
	Resource `json:"-"`
	// Removed IDs dos clientes removidos, incluindo os que já haviam sido removidos.
	Removed []string `json:"removed"`
	// Blocked IDs dos clientes com cobranças vinculadas ainda não removidas, inclusive pagas.
	Blocked []string `json:"blocked"`
	// Invalid Valores inválidos, de clientes inexistentes ou de clientes que sua autenticação não permite acessar.
	Invalid []*string `json:"invalid"`
	// Errors Motivo de cada item não removido, com campo identifiers[índice], código e explicação em inglês. Um lote sem falhas retorna uma lista vazia.
	Errors []FieldError `json:"errors"`
}

CustomerBatchDeleted contains the fields defined by the public API.

func (CustomerBatchDeleted) MarshalJSON

func (v CustomerBatchDeleted) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerBatchDeleted) UnmarshalJSON

func (v *CustomerBatchDeleted) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerBatchDeleted response.

type CustomerCreated

type CustomerCreated struct {
	Resource `json:"-"`
	// ID Identificador público do cliente para reutilizar nas próximas requisições.
	ID string `json:"id"`
	// Object Tipo do recurso retornado.
	Object string `json:"object"`
	// TaxID CPF ou CNPJ do cliente.
	TaxID string `json:"tax_id"`
	// TaxIDType Tipo do documento do cliente: cpf ou cnpj.
	TaxIDType string `json:"tax_id_type"`
	// CreatedAt Instante da criação em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// ExternalReference Identificador do cliente no seu sistema, quando informado.
	ExternalReference *string `json:"external_reference"`
	// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
	Metadata map[string]string `json:"metadata"`
}

CustomerCreated contains the fields defined by the public API.

func (CustomerCreated) MarshalJSON

func (v CustomerCreated) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerCreated) UnmarshalJSON

func (v *CustomerCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerCreated response.

type CustomerDeleted

type CustomerDeleted struct {
	Resource `json:"-"`
	// ID Identificador público do cliente removido na Raims.
	ID string `json:"id"`
	// Deleted Confirma que o cliente foi removido.
	Deleted bool `json:"deleted"`
}

CustomerDeleted contains the fields defined by the public API.

func (CustomerDeleted) MarshalJSON

func (v CustomerDeleted) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerDeleted) UnmarshalJSON

func (v *CustomerDeleted) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerDeleted response.

type CustomerListItem

type CustomerListItem struct {
	Resource `json:"-"`
	// ID Identificador público do cliente.
	ID string `json:"id"`
	// Name Nome completo do cliente.
	Name string `json:"name"`
	// FirstName Primeiro nome do cliente.
	FirstName string `json:"first_name"`
	// LastName Restante do nome do cliente.
	LastName string `json:"last_name"`
	// Email E-mail do cliente.
	Email string `json:"email"`
	// TaxID CPF ou CNPJ do cliente.
	TaxID string `json:"tax_id"`
	// TaxIDType Tipo do documento: cpf ou cnpj.
	TaxIDType string `json:"tax_id_type"`
	// DialCode Código de discagem internacional do telefone.
	DialCode string `json:"dial_code"`
	// PhoneLocal Número de telefone sem o código de discagem, somente com dígitos.
	PhoneLocal string `json:"phone_local"`
	// ZipCode CEP do endereço.
	ZipCode string `json:"zip_code"`
	// Street Logradouro.
	Street string `json:"street"`
	// StreetNumber Número do endereço.
	StreetNumber string `json:"street_number"`
	// Complement Complemento do endereço, quando informado.
	Complement *string `json:"complement"`
	// Neigh Bairro.
	Neigh string `json:"neigh"`
	// City Cidade.
	City string `json:"city"`
	// State Sigla do estado.
	State string `json:"state"`
	// CreatedAt Instante da criação em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Instante da atualização cadastral em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
	// ExternalReference Identificador do cliente no seu sistema, quando informado.
	ExternalReference *string `json:"external_reference"`
	// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
	Metadata map[string]string `json:"metadata"`
}

CustomerListItem contains the fields defined by the public API.

func (CustomerListItem) MarshalJSON

func (v CustomerListItem) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerListItem) UnmarshalJSON

func (v *CustomerListItem) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerListItem response.

type CustomerListPage

type CustomerListPage struct {
	Resource `json:"-"`
	// PageSize Tamanho de página aplicado à consulta.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há clientes na próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há clientes na página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para continuar com after; null quando não há próxima página.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para voltar com before; null quando não há página anterior.
	PreviousBefore *string `json:"previous_before"`
}

CustomerListPage contains the fields defined by the public API.

func (CustomerListPage) MarshalJSON

func (v CustomerListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerListPage) UnmarshalJSON

func (v *CustomerListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerListPage response.

type CustomerListResponse

type CustomerListResponse struct {
	Resource `json:"-"`
	// List Clientes encontrados na empresa e no ambiente autenticado.
	List []CustomerListItem `json:"list"`
	// Page Informações para continuar ou voltar na listagem.
	Page CustomerListPage `json:"page"`
}

CustomerListResponse contains the fields defined by the public API.

func (CustomerListResponse) MarshalJSON

func (v CustomerListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*CustomerListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*CustomerListResponse) PreviousPage

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*CustomerListResponse) UnmarshalJSON

func (v *CustomerListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public CustomerListResponse response.

type CustomersService

type CustomersService struct {
	// contains filtered or unexported fields
}

CustomersService provides the endpoints available through Client.Customers.

func (*CustomersService) Create

Create Criar cliente

func (*CustomersService) Delete

func (s *CustomersService) Delete(ctx context.Context, id string, options ...RequestOption) (*CustomerDeleted, error)

Delete Remover cliente

func (*CustomersService) DeleteBatch

func (s *CustomersService) DeleteBatch(ctx context.Context, params *RemoveCustomersParams, options ...RequestOption) (*CustomerBatchDeleted, error)

DeleteBatch Remover clientes em lote

func (*CustomersService) Get

func (s *CustomersService) Get(ctx context.Context, id string, options ...RequestOption) (*CustomerListItem, error)

Get Recuperar um único cliente

func (*CustomersService) List

List Listar clientes

func (*CustomersService) ListAll

ListAll lazily follows forward cursors and preserves the original filters.

func (*CustomersService) Update

func (s *CustomersService) Update(ctx context.Context, id string, params *UpdateCustomerParams, options ...RequestOption) (*CustomerListItem, error)

Update Atualizar cliente existente

type Dispute

type Dispute struct {
	Resource `json:"-"`
	// OpenedAt Data de abertura da contestação, em segundos Unix UTC, ou null quando não informada.
	OpenedAt *int64 `json:"opened_at"`
	// DueAt Prazo registrado para resposta, em segundos Unix UTC, ou null quando não informado. Esta consulta não permite enviar uma resposta.
	DueAt *int64 `json:"due_at"`
	// ComplaintDetails Relato disponível da contestação, ou null quando não informado.
	ComplaintDetails *string `json:"complaint_details"`
	// CompanyResponse Resposta registrada da empresa, ou null quando não informada.
	CompanyResponse *string `json:"company_response"`
	// RespondedAt Data da resposta registrada da empresa, em segundos Unix UTC, ou null.
	RespondedAt *int64 `json:"responded_at"`
	// ResolvedAt Data registrada de encerramento ou resolução do caso, em segundos Unix UTC, ou null. Não confirma movimentação financeira.
	ResolvedAt *int64 `json:"resolved_at"`
	// WonAmountCents Valor com decisão favorável à empresa em um registro chargeback, em centavos de real. Null para casos MED ou quando não disponível.
	WonAmountCents *int64 `json:"won_amount_cents"`
	// LostAmountCents Valor com decisão desfavorável à empresa em um registro chargeback, em centavos de real. Null para casos MED ou quando não disponível.
	LostAmountCents *int64 `json:"lost_amount_cents"`
	// RefundedAmountCents Total de devoluções confirmadas para o caso MED, em centavos de real. Null para registros chargeback ou quando não houver resultado disponível. O aceite da análise não confirma este valor.
	RefundedAmountCents *int64 `json:"refunded_amount_cents"`
	// InfractionResult Resultado da análise de infração MED: agreed para infração reconhecida ou disagreed para infração não reconhecida. Null quando não disponível ou não aplicável.
	InfractionResult *string `json:"infraction_result"`
	// RefundResult Resultado da análise de devolução MED: partially_accepted, totally_accepted ou rejected. Null quando não disponível ou não aplicável. Aceite não comprova devolução financeira.
	RefundResult *string `json:"refund_result"`
	// LossReasonCode Motivo informado para o resultado desfavorável: 1 prazo de resposta expirado, 2 evidências insuficientes, 3 documentação inválida, 4 decisão final ou 5 outro. Null quando não disponível ou não aplicável.
	LossReasonCode *int64 `json:"loss_reason_code"`
	// LossReasonNote Observação disponível sobre o motivo do resultado desfavorável, ou null.
	LossReasonNote *string `json:"loss_reason_note"`
	// ID Identificador público completo do caso, com prefixo dp_ ou med_. Use este valor na consulta individual.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança vinculada, ou null quando não houver vínculo disponível.
	ChargeID *string `json:"charge_id"`
	// Kind Tipo do caso: med para o procedimento MED do Pix e chargeback para os demais registros de contestação apresentados pela Raims.
	Kind string `json:"kind"`
	// Stage Etapa atual: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução.
	Stage string `json:"stage"`
	// ReasonCode Motivo relatado, que não confirma fraude, conforme kind. Para med: 1 golpe, 2 conta invadida, 3 coação, 4 acesso fraudulento, 5 outro e 6 desconhecido. Para chargeback: 1 alegação de fraude, 2 compra não reconhecida, 3 serviço não reconhecido, 4 produto ou serviço divergente, 5 cobrança indevida e 6 outro. Null quando não informado.
	ReasonCode *int64 `json:"reason_code"`
	// DisputedAmountCents Valor contestado, em centavos de real. Não representa o valor atualmente bloqueado nem confirma devolução.
	DisputedAmountCents int64 `json:"disputed_amount_cents"`
	// CreatedAt Data de criação do registro na Raims, em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Data da última atualização disponível, em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
}

Dispute Detalhes e resultados disponíveis de uma contestação.

func (Dispute) MarshalJSON

func (v Dispute) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Dispute) UnmarshalJSON

func (v *Dispute) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Dispute response.

type DisputeListItem

type DisputeListItem struct {
	Resource `json:"-"`
	// ID Identificador público completo do caso, com prefixo dp_ ou med_. Use este valor na consulta individual.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança vinculada, ou null quando não houver vínculo disponível.
	ChargeID *string `json:"charge_id"`
	// Kind Tipo do caso: med para o procedimento MED do Pix e chargeback para os demais registros de contestação apresentados pela Raims.
	Kind string `json:"kind"`
	// Stage Etapa atual: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução.
	Stage string `json:"stage"`
	// ReasonCode Motivo relatado, que não confirma fraude, conforme kind. Para med: 1 golpe, 2 conta invadida, 3 coação, 4 acesso fraudulento, 5 outro e 6 desconhecido. Para chargeback: 1 alegação de fraude, 2 compra não reconhecida, 3 serviço não reconhecido, 4 produto ou serviço divergente, 5 cobrança indevida e 6 outro. Null quando não informado.
	ReasonCode *int64 `json:"reason_code"`
	// DisputedAmountCents Valor contestado, em centavos de real. Não representa o valor atualmente bloqueado nem confirma devolução.
	DisputedAmountCents int64 `json:"disputed_amount_cents"`
	// CreatedAt Data de criação do registro na Raims, em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Data da última atualização disponível, em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
}

DisputeListItem Dados de uma contestação presentes na listagem.

func (DisputeListItem) MarshalJSON

func (v DisputeListItem) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*DisputeListItem) UnmarshalJSON

func (v *DisputeListItem) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public DisputeListItem response.

type DisputeListPage

type DisputeListPage struct {
	Resource `json:"-"`
	// PageSize Quantidade efetiva de contestações solicitada por página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há outra página na direção de avanço.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para after na próxima página, ou null quando não houver avanço.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para before na página anterior, ou null quando não houver retorno.
	PreviousBefore *string `json:"previous_before"`
}

DisputeListPage Informações para navegar pelas contestações com os mesmos filtros e ordenação.

func (DisputeListPage) MarshalJSON

func (v DisputeListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*DisputeListPage) UnmarshalJSON

func (v *DisputeListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public DisputeListPage response.

type DisputeListResponse

type DisputeListResponse struct {
	Resource `json:"-"`
	// List Contestações presentes nesta página, na ordenação solicitada.
	List []DisputeListItem `json:"list"`
	// Page Informações de navegação para a mesma consulta.
	Page DisputeListPage `json:"page"`
}

DisputeListResponse Página de contestações acessíveis à chave utilizada.

func (DisputeListResponse) MarshalJSON

func (v DisputeListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*DisputeListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*DisputeListResponse) PreviousPage

func (v *DisputeListResponse) PreviousPage(ctx context.Context) (*DisputeListResponse, error)

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*DisputeListResponse) UnmarshalJSON

func (v *DisputeListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public DisputeListResponse response.

type DisputesService

type DisputesService struct {
	// contains filtered or unexported fields
}

DisputesService provides the endpoints available through Client.Disputes.

func (*DisputesService) Get

func (s *DisputesService) Get(ctx context.Context, id string, options ...RequestOption) (*Dispute, error)

Get Recuperar uma contestação

func (*DisputesService) List

List Listar contestações

func (*DisputesService) ListAll

ListAll lazily follows forward cursors and preserves the original filters.

type Environment

type Environment string

Environment selects the data environment of an OAuth client. API keys determine their own environment and do not use this setting.

type Error

type Error struct {
	Resource `json:"-"`
	// Code Código estável do erro.
	Code string `json:"code"`
	// Message Explicação do erro em inglês. Em validações, resume a categoria; os detalhes identificam as correções. Use os códigos para tratar a resposta.
	Message string `json:"message"`
	// Details Falhas em campos recebidos ou referências enviadas no corpo, com campo, código e explicação. Omitido em erros gerais e quando não há correção de campo a indicar.
	Details *[]FieldError `json:"details"`
}

Error contains the fields defined by the public API.

func (Error) MarshalJSON

func (v Error) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Error) UnmarshalJSON

func (v *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Error response.

type ErrorResponse

type ErrorResponse struct {
	Resource `json:"-"`
	// Error Código e explicação do erro retornado pela API.
	Error Error `json:"error"`
}

ErrorResponse contains the fields defined by the public API.

func (ErrorResponse) MarshalJSON

func (v ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ErrorResponse) UnmarshalJSON

func (v *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ErrorResponse response.

type FieldError

type FieldError struct {
	Resource `json:"-"`
	// Field Nome público do campo JSON, parâmetro de consulta, parâmetro de rota ou header relacionado ao erro. Campos aninhados e listas preservam o caminho e o índice. $ representa a raiz do corpo JSON.
	Field string `json:"field"`
	// Code Motivo do erro no campo, como REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD ou INVALID_TYPE.
	Code string `json:"code"`
	// Message Explicação em inglês sobre o problema nesse campo ou parâmetro e a correção disponível. Não use o texto para decidir o fluxo da integração.
	Message string `json:"message"`
}

FieldError contains the fields defined by the public API.

func (FieldError) MarshalJSON

func (v FieldError) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*FieldError) UnmarshalJSON

func (v *FieldError) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public FieldError response.

type FinancialDocument

type FinancialDocument struct {
	Resource `json:"-"`
	// URL URL HTTPS temporária em files.raims.com. Use o endereço completo em um GET para baixar o PDF, sem enviar Authorization ou a chave de API. Não altere seus parâmetros.
	URL string `json:"url"`
	// ExpiresAt Expiração do link em segundos Unix UTC. Depois desse instante, consulte novamente o endpoint do documento com a chave de API.
	ExpiresAt int64 `json:"expires_at"`
}

FinancialDocument URL temporária para baixar um documento financeiro em PDF. A URL permite acesso a quem a possuir até expires_at e pode ser reutilizada nesse prazo. Compartilhe-a somente com pessoas autorizadas e não a registre em logs. Após a expiração, consulte novamente o endpoint autenticado para obter outro link. O download pode retornar HTTP 403 para um link inválido ou expirado, sem o envelope JSON de erros da API.

func (FinancialDocument) MarshalJSON

func (v FinancialDocument) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*FinancialDocument) UnmarshalJSON

func (v *FinancialDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public FinancialDocument response.

type GetBalanceForecastParams

type GetBalanceForecastParams struct {
	// Period Período das datas previstas de recebimento, pelo calendário de São Paulo. Inclui hoje e os dias anteriores conforme a opção. Não consulta vencimentos nem projeta os próximos dias. Padrão: "today". Exemplo: "last_7_days".
	Period Optional[string] `json:"period,omitzero"`
}

GetBalanceForecastParams contains the fields defined by the public API.

type GetChargeStatisticsParams

type GetChargeStatisticsParams struct {
	// Period Período da consulta, pelo calendário de São Paulo. today considera hoje; last_7_days, last_15_days e last_30_days incluem hoje e os dias anteriores. A consulta aceita somente esses períodos. start_at e end_at são campos da resposta, não filtros de datas personalizadas. Padrão: "today". Exemplo: "last_7_days".
	Period Optional[string] `json:"period,omitzero"`
}

GetChargeStatisticsParams contains the fields defined by the public API.

type IssueSimulationPaymentParams

type IssueSimulationPaymentParams struct {
	// PaymentMethod Meio a emitir: 1 para Pix ou 2 para boleto. Deve estar habilitado na cobrança.
	PaymentMethod Optional[int64] `json:"payment_method,omitzero"`
}

IssueSimulationPaymentParams Meio de pagamento da emissão de teste.

type Iterator

type Iterator[T any] struct {
	// contains filtered or unexported fields
}

Iterator loads pages only when Next or All advances. Do not share an iterator between goroutines.

func (*Iterator[T]) All

func (i *Iterator[T]) All() iter.Seq2[*T, error]

All supports range over a lazy sequence. Breaking the loop stops further HTTP requests.

func (*Iterator[T]) Current

func (i *Iterator[T]) Current() *T

Current returns the item selected by the last successful Next call. It returns nil before iteration and after Next returns false.

func (*Iterator[T]) Err

func (i *Iterator[T]) Err() error

Err returns the error that stopped iteration, or nil when no error occurred.

func (*Iterator[T]) Next

func (i *Iterator[T]) Next() bool

Next advances to the next item, fetching another page only when necessary. It returns false at the end or after an error; inspect Err to distinguish them.

type ListChargeRefundsParams

type ListChargeRefundsParams struct {
	// PageSize Quantidade de estornos por página. Valores acima do máximo usam o máximo; ausência, vazio, texto, zero ou valor negativo usa o padrão. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor recebido em page.next_after para avançar. Copie o valor completo e mantenha a mesma cobrança. Não envie junto de before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor recebido em page.previous_before para voltar. Copie o valor completo e mantenha a mesma cobrança. Não envie junto de after. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// CreatedGte Filtra estornos solicitados a partir deste instante, inclusive, em segundos Unix UTC. Usa a data de criação da solicitação, sem depender da conclusão. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
	CreatedGte Optional[int64] `json:"created_gte,omitzero"`
	// CreatedLte Filtra estornos solicitados até este instante, inclusive, em segundos Unix UTC. Se informar created_gte, este valor deve ser maior ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
	CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}

ListChargeRefundsParams contains the fields defined by the public API.

type ListChargesParams

type ListChargesParams struct {
	// PageSize Quantidade de cobranças por página. Inteiros positivos acima do máximo usam o máximo. Valor omitido, vazio, zero, negativo ou inválido usa 10. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Copie page.next_after da resposta anterior para avançar. Mantenha os mesmos filtros e a ordenação; não envie before junto. Deixe vazio para começar a listagem. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Copie page.previous_before da resposta anterior para voltar. Mantenha os mesmos filtros e a ordenação; não envie after junto. Deixe vazio se não quiser voltar. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// Identifier Filtra pelo ID completo da cobrança. Se não houver correspondência, list será vazio. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
	Identifier Optional[string] `json:"identifier,omitzero"`
	// CustomerID Filtra pelo ID público completo do cliente, retornado no cadastro ou na consulta. O vínculo permanece o mesmo se nome ou e-mail mudar. Pode ser combinado com os demais filtros; mantenha o mesmo customer_id ao mudar de página. Um ID válido sem cobranças na empresa e no ambiente autenticado retorna list vazio. Vazio ou ausência não aplica o filtro. Comprimento máximo: 100. Exemplo: "cus_1Q2W3E4R5T6Y7U8I9O0P".
	CustomerID Optional[string] `json:"customer_id,omitzero"`
	// ExternalReference Filtra pela referência atual da cobrança no seu sistema, com igualdade do valor completo, incluindo maiúsculas, minúsculas e acentos. Vazio ou ausência não aplica o filtro. Pode ser combinado com os demais filtros; preserve o valor ao navegar por cursor. Após criar ou editar uma cobrança, pode levar alguns segundos para a busca refletir a referência. Comprimento máximo: 120. Exemplo: "pedido_12345".
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
	// Email Filtra pelo e-mail completo registrado na cobrança. Alterar o cadastro do cliente não altera esse e-mail. Comprimento máximo: 254. Exemplo: "cliente@example.com".
	Email Optional[string] `json:"email,omitzero"`
	// Status Filtra por um ou mais códigos separados por vírgula, como 0,1. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho. Pode levar alguns segundos para refletir alterações. Comprimento máximo: 64. Exemplo: "0,1".
	Status Optional[string] `json:"status,omitzero"`
	// PaymentMethod Filtra pelo meio de pagamento da cobrança: 1 para Pix e 2 para boleto. Para combinar, envie 1,2. Uma cobrança com meio indefinido pode passar a usar Pix ou boleto quando o código Pix ou boleto é gerado no checkout. A seleção na tela, por si só, não altera o filtro. Comprimento máximo: 32. Exemplo: "1,2".
	PaymentMethod Optional[string] `json:"payment_method,omitzero"`
	// CreatedGte Filtra cobranças criadas a partir deste instante, inclusive, em segundos Unix UTC. Se informar created_lte, este valor deve ser menor ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
	CreatedGte Optional[int64] `json:"created_gte,omitzero"`
	// CreatedLte Filtra cobranças criadas até este instante, inclusive, em segundos Unix UTC. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
	CreatedLte Optional[int64] `json:"created_lte,omitzero"`
	// DueGte Filtra cobranças com vencimento a partir deste instante, inclusive, em segundos Unix UTC. Pode ser combinado com due_lte e os demais filtros; mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1893456000.
	DueGte Optional[int64] `json:"due_gte,omitzero"`
	// DueLte Filtra cobranças com vencimento até este instante, inclusive, em segundos Unix UTC. Se informar due_gte, este valor deve ser maior ou igual a ele. Pode ser usado sozinho ou com os demais filtros. Mínimo: 0. Máximo: 253402300799. Exemplo: 1896047999.
	DueLte Optional[int64] `json:"due_lte,omitzero"`
	// PaidGte Filtra cobranças pagas a partir deste instante, inclusive, em segundos Unix UTC. Usa a data do pagamento confirmado, mesmo quando houver estorno posterior. Cobranças sem pagamento confirmado ficam fora do resultado. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
	PaidGte Optional[int64] `json:"paid_gte,omitzero"`
	// PaidLte Filtra cobranças pagas até este instante, inclusive, em segundos Unix UTC. Se informar paid_gte, este valor deve ser maior ou igual a ele. Pode ser combinado com os demais filtros. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
	PaidLte Optional[int64] `json:"paid_lte,omitzero"`
	// SortKey Ordena por valor em centavos ou data de criação. Se omitido, usa a ordem de cadastro; com filtro de criação, usa created_at. Mantenha a mesma ordenação ao mudar de página. Exemplo: "created_at".
	SortKey Optional[string] `json:"sort_key,omitzero"`
	// SortOrder Define a direção da ordenação. Com desc, a ordem padrão mostra as cobranças mais recentes primeiro. Padrão: "desc".
	SortOrder Optional[string] `json:"sort_order,omitzero"`
}

ListChargesParams contains the fields defined by the public API.

type ListCustomersParams

type ListCustomersParams struct {
	// PageSize Quantidade de clientes por página. Inteiros positivos acima do máximo usam o máximo. Valor omitido, vazio, zero, negativo ou inválido usa 10. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Copie page.next_after da resposta anterior para avançar. Use o cursor sem alterações, mantenha os mesmos filtros e não envie before junto. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Copie page.previous_before da resposta anterior para voltar uma página. Mantenha os mesmos filtros e não envie after junto. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// Identifier Identificador público do cliente, com prefixo cus_. Comprimento máximo: 100. Exemplo: "cus_3AbHiWSrsZBoaTg47OcMzC".
	Identifier Optional[string] `json:"identifier,omitzero"`
	// Name Busca pelo nome do cliente, com os cadastros mais recentes primeiro. Deixe vazio para ignorar este filtro. Comprimento mínimo: 2. Comprimento máximo: 120. Exemplo: "Maria Silva".
	Name Optional[string] `json:"name,omitzero"`
	// Email Filtra pelo e-mail completo do cliente. Comprimento máximo: 254. Exemplo: "cliente@example.com".
	Email Optional[string] `json:"email,omitzero"`
	// Document Filtra pelo CPF ou CNPJ completo do cliente, com ou sem pontos, barra, hífen e espaços. Comprimento máximo: 20. Exemplo: "12345678909".
	Document Optional[string] `json:"document,omitzero"`
	// ExternalReference Filtra pela referência atual do cliente no seu sistema, com igualdade do valor completo, incluindo maiúsculas, minúsculas e acentos. Pode ser combinada com os demais filtros. Após criar ou editar o cliente, a busca pode levar alguns segundos para refletir a referência. Mantenha o valor ao navegar por cursor. Comprimento máximo: 120. Exemplo: "cliente_12345".
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
}

ListCustomersParams contains the fields defined by the public API.

type ListDisputesParams

type ListDisputesParams struct {
	// PageSize Quantidade de contestações por página. Valores inválidos usam o padrão; valores acima do máximo usam o limite. Padrão: 10. Mínimo: 1. Máximo: 100. Exemplo: 10.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor de page.next_after da resposta anterior. Preserve os filtros e a ordenação; não envie junto de before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor de page.previous_before para voltar. Preserve os filtros e a ordenação; não envie junto de after. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// Stage Etapas do caso separadas por vírgula: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução. Comprimento máximo: 256. Exemplo: "in_analysis,refund_in_analysis".
	Stage Optional[string] `json:"stage,omitzero"`
	// ChargeID Filtra pela cobrança vinculada, usando o identificador público completo. Um ID válido sem casos acessíveis retorna uma lista vazia. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
	ChargeID Optional[string] `json:"charge_id,omitzero"`
	// DisputedAmountCents Filtra pelo valor contestado exato, em centavos de real. Não representa o valor atualmente bloqueado. Mínimo: 0. Exemplo: 10000.
	DisputedAmountCents Optional[int64] `json:"disputed_amount_cents,omitzero"`
	// CreatedGte Inclui contestações criadas a partir deste instante, em segundos Unix UTC. O limite é inclusivo. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791878400.
	CreatedGte Optional[int64] `json:"created_gte,omitzero"`
	// CreatedLte Inclui contestações criadas até este instante, em segundos Unix UTC. O limite é inclusivo e deve ser igual ou posterior a created_gte. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791964800.
	CreatedLte Optional[int64] `json:"created_lte,omitzero"`
	// SortKey Campo usado para ordenar a lista: criação ou valor contestado. Padrão: "created_at". Exemplo: "created_at".
	SortKey Optional[string] `json:"sort_key,omitzero"`
	// SortOrder Ordem crescente ou decrescente do campo selecionado. Padrão: "desc". Exemplo: "desc".
	SortOrder Optional[string] `json:"sort_order,omitzero"`
}

ListDisputesParams contains the fields defined by the public API.

type ListPaymentLinksParams

type ListPaymentLinksParams struct {
	// PageSize Quantidade de links por página. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor recebido em page.next_after. Mantenha o mesmo filtro charge_id. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor recebido em page.previous_before. Não envie junto com after. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// ChargeID Identificador da cobrança cujo link você quer consultar. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
	ChargeID Optional[string] `json:"charge_id,omitzero"`
}

ListPaymentLinksParams contains the fields defined by the public API.

type ListRefundsParams

type ListRefundsParams struct {
	// PageSize Quantidade de estornos por página. Valores acima do máximo usam o máximo; ausência, vazio, texto, zero ou valor negativo usa o padrão. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor recebido em page.next_after para avançar nesta lista. Copie o valor completo. Não use um cursor da lista de uma cobrança nem envie junto de before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor recebido em page.previous_before para voltar nesta lista. Copie o valor completo. Não use um cursor da lista de uma cobrança nem envie junto de after. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// CreatedGte Filtra estornos solicitados a partir deste instante, inclusive, em segundos Unix UTC. Usa a data de criação da solicitação, sem depender da conclusão. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
	CreatedGte Optional[int64] `json:"created_gte,omitzero"`
	// CreatedLte Filtra estornos solicitados até este instante, inclusive, em segundos Unix UTC. Se informar created_gte, este valor deve ser maior ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
	CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}

ListRefundsParams contains the fields defined by the public API.

type ListStatementsParams

type ListStatementsParams struct {
	// PageSize Quantidade de lançamentos por página. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor recebido em page.next_after para avançar. Mantenha os mesmos filtros e a mesma ordem. Use somente after ou before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor recebido em page.previous_before para voltar. Mantenha os mesmos filtros e a mesma ordem. Use somente after ou before. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// StatementType Tipos de lançamento separados por vírgula: 1 recebimento; 2 tarifa; 3 tarifa de serviço; 4 saque; 5 devolução; 6 devolução parcial; 7 crédito por ajuste; 8 débito por ajuste; 9 bloqueio; 10 liberação. Comprimento máximo: 100. Exemplo: "1,2".
	StatementType Optional[string] `json:"statement_type,omitzero"`
	// ReferenceID Identificador da cobrança, contestação, saque ou ajuste relacionado ao lançamento. Use o ID completo retornado pela Raims. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
	ReferenceID Optional[string] `json:"reference_id,omitzero"`
	// CreatedGte Início inclusivo do período, em segundos Unix UTC. O filtro considera o instante do lançamento. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791849600.
	CreatedGte Optional[int64] `json:"created_gte,omitzero"`
	// CreatedLte Fim inclusivo do período, em segundos Unix UTC. O instante informado é o limite exato; frações posteriores ao segundo informado ficam fora do período. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791935999.
	CreatedLte Optional[int64] `json:"created_lte,omitzero"`
	// SortOrder Ordem dos lançamentos pela data: desc mostra os mais recentes primeiro; asc mostra os mais antigos primeiro. Padrão: "desc".
	SortOrder Optional[string] `json:"sort_order,omitzero"`
}

ListStatementsParams contains the fields defined by the public API.

type ListWebhooksParams

type ListWebhooksParams struct {
	// PageSize Quantidade de registros por página. A resposta informa o tamanho efetivo em page.page_size. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Para avançar, copie page.next_after da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Para voltar, copie page.previous_before da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
}

ListWebhooksParams contains the fields defined by the public API.

type ListWithdrawalDestinationsParams

type ListWithdrawalDestinationsParams struct {
	// PageSize Quantidade de registros considerados para a página. A lista pode ter menos destinos e ainda indicar uma próxima página; continue enquanto page.has_next for true. Padrão: 10. Mínimo: 1. Máximo: 100.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor recebido em page.next_after para avançar. Copie o valor inteiro e mantenha a mesma chave de API. Não envie junto de before. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor recebido em page.previous_before para voltar. Copie o valor inteiro e mantenha a mesma chave de API. Não envie junto de after. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
}

ListWithdrawalDestinationsParams contains the fields defined by the public API.

type ListWithdrawalsParams

type ListWithdrawalsParams struct {
	// PageSize Quantidade de saques por página. Padrão: 10. Mínimo: 1. Máximo: 100. Exemplo: 10.
	PageSize Optional[int64] `json:"page_size,omitzero"`
	// After Cursor next_after retornado na página anterior. Mantenha os mesmos filtros e a mesma ordem da consulta. Comprimento máximo: 128.
	After Optional[string] `json:"after,omitzero"`
	// Before Cursor previous_before retornado na página seguinte. Mantenha os mesmos filtros e a mesma ordem da consulta. Comprimento máximo: 128.
	Before Optional[string] `json:"before,omitzero"`
	// Status Filtre por um ou mais estados separados por vírgula: PENDING, PROCESSING, COMPLETED, FAILED ou CANCELED. Comprimento máximo: 100. Exemplo: "COMPLETED".
	Status Optional[string] `json:"status,omitzero"`
	// RequestedGte Retorne saques solicitados a partir deste instante, inclusive. Informe segundos Unix UTC. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791878400.
	RequestedGte Optional[int64] `json:"requested_gte,omitzero"`
	// RequestedLte Retorne saques solicitados até este instante, inclusive. Informe segundos Unix UTC. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791964800.
	RequestedLte Optional[int64] `json:"requested_lte,omitzero"`
	// SortOrder Ordenação pela data de solicitação: desc mostra os mais recentes primeiro; asc mostra os mais antigos primeiro. Padrão: "desc". Exemplo: "desc".
	SortOrder Optional[string] `json:"sort_order,omitzero"`
}

ListWithdrawalsParams contains the fields defined by the public API.

type Optional

type Optional[T any] struct {
	// contains filtered or unexported fields
}

Optional distinguishes an omitted request field from a value or explicit null. Use Set(value) or Null[T](). The zero value omits the field.

func Null

func Null[T any]() Optional[T]

Null includes a field as explicit JSON null when the endpoint permits it.

func Set

func Set[T any](value T) Optional[T]

Set includes a field with the supplied value, including false, zero and empty text. A nil map or slice is encoded as null; initialize an empty map or slice to send {} or [].

func (Optional[T]) IsNull

func (o Optional[T]) IsNull() bool

IsNull reports whether the field was explicitly set to JSON null.

func (Optional[T]) IsSet

func (o Optional[T]) IsSet() bool

IsSet reports whether a value or explicit null was supplied.

func (Optional[T]) IsZero

func (o Optional[T]) IsZero() bool

IsZero reports whether the field is omitted. It supports the JSON omitzero tag.

func (Optional[T]) MarshalJSON

func (o Optional[T]) MarshalJSON() ([]byte, error)

MarshalJSON encodes the value or null. Omission is controlled by the containing field's omitzero tag; serializing an omitted Optional on its own produces null.

func (*Optional[T]) UnmarshalJSON

func (o *Optional[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON records the supplied JSON value or explicit null. Invalid input leaves the existing Optional unchanged.

func (Optional[T]) Value

func (o Optional[T]) Value() (T, bool)

Value returns the stored value and true when a non-null value was supplied. The boolean is false for omitted fields and explicit null.

type PaymentLink struct {
	Resource `json:"-"`
	// ID Identificador público do link de pagamento.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança vinculada. Consulte a cobrança para obter seus dados financeiros.
	ChargeID string `json:"charge_id"`
	// URL URL do checkout dessa cobrança. Repetir a criação reutiliza o mesmo link.
	URL string `json:"url"`
	// SuccessRedirectURL URL de retorno após a confirmação do pagamento, ou null quando não configurada.
	SuccessRedirectURL *string `json:"success_redirect_url"`
	// CancelRedirectURL URL de retorno ao seu site, ou null quando não configurada. Voltar ao site não cancela a cobrança.
	CancelRedirectURL *string `json:"cancel_redirect_url"`
	// PaymentMethodTypes Configuração própria dos meios do link, ou null para herança. A cobrança e a disponibilidade da plataforma continuam limitando os meios aceitos.
	PaymentMethodTypes *[]int64 `json:"payment_method_types"`
	// CreatedAt Data de criação do link em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Data da última alteração do link ou de suas configurações em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
	// IsActive Indica se o link está ativo. False significa que o checkout foi pausado. Um link ativo continua sujeito às condições da cobrança.
	IsActive bool `json:"is_active"`
}

PaymentLink contains the fields defined by the public API.

func (PaymentLink) MarshalJSON

func (v PaymentLink) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLink) UnmarshalJSON

func (v *PaymentLink) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLink response.

type PaymentLinkDetails

type PaymentLinkDetails struct {
	Resource `json:"-"`
	// ID Identificador público do link de pagamento.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança vinculada. Consulte a cobrança para obter seus dados financeiros.
	ChargeID string `json:"charge_id"`
	// URL URL do checkout dessa cobrança. Repetir a criação reutiliza o mesmo link.
	URL string `json:"url"`
	// SuccessRedirectURL URL de retorno após a confirmação do pagamento, ou null quando não configurada.
	SuccessRedirectURL *string `json:"success_redirect_url"`
	// CancelRedirectURL URL de retorno ao seu site, ou null quando não configurada. Voltar ao site não cancela a cobrança.
	CancelRedirectURL *string `json:"cancel_redirect_url"`
	// PaymentMethodTypes Configuração própria de Pix e boleto no link. Null indica herança; uma lista vazia indica que a configuração não contém nenhum desses meios. A disponibilidade efetiva aparece em effective_payment_method_types.
	PaymentMethodTypes *[]int64 `json:"payment_method_types"`
	// CreatedAt Data de criação do link em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Data da última alteração do link ou de suas configurações em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
	// IsPayable Indica se a cobrança ainda pode ser paga por este link. Links pausados e cobranças pagas, revogadas ou vencidas, por exemplo, retornam false. A informação vale para o instante da consulta e não confirma pagamento.
	IsPayable bool `json:"is_payable"`
	// EffectivePaymentMethodTypes Meios de pagamento definidos pelas configurações da cobrança, do link e da conta, entre os disponíveis na plataforma. Uma cobrança já paga ou um link pausado pode continuar mostrando Pix e boleto nessa lista. Use is_payable para saber se ainda é possível pagar pelo checkout.
	EffectivePaymentMethodTypes []int64 `json:"effective_payment_method_types"`
	// UnavailableReason Motivo que impede pagar a cobrança por este link, ou null quando is_payable for true.
	UnavailableReason *PaymentLinkUnavailableReason `json:"unavailable_reason"`
	// IsActive Indica se o link está ativo. False significa que o checkout foi pausado. Um link ativo continua sujeito às condições da cobrança.
	IsActive bool `json:"is_active"`
}

PaymentLinkDetails Dados do link de pagamento de uma cobrança.

func (PaymentLinkDetails) MarshalJSON

func (v PaymentLinkDetails) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLinkDetails) UnmarshalJSON

func (v *PaymentLinkDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLinkDetails response.

type PaymentLinkEmailRequestAccepted

type PaymentLinkEmailRequestAccepted struct {
	Resource `json:"-"`
	// ID Identificador público do link de pagamento.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança vinculada ao link.
	ChargeID string `json:"charge_id"`
	// RecipientEmail E-mail escolhido para receber o link: o do pagador do boleto, quando registrado; na ausência dele, o da cobrança e, por último, o do cadastro atual do cliente. Um endereço inválido impede o envio.
	RecipientEmail string `json:"recipient_email"`
	// RetryAfterSeconds Tempo, em segundos, até permitir outra solicitação de envio para a cobrança.
	RetryAfterSeconds int64 `json:"retry_after_seconds"`
	// RetryAfterUntil Instante, em segundos Unix UTC, a partir do qual outra solicitação de envio pode ser feita.
	RetryAfterUntil int64 `json:"retry_after_until"`
}

PaymentLinkEmailRequestAccepted contains the fields defined by the public API.

func (PaymentLinkEmailRequestAccepted) MarshalJSON

func (v PaymentLinkEmailRequestAccepted) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLinkEmailRequestAccepted) UnmarshalJSON

func (v *PaymentLinkEmailRequestAccepted) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLinkEmailRequestAccepted response.

type PaymentLinkListPage

type PaymentLinkListPage struct {
	Resource `json:"-"`
	// PageSize Quantidade de links solicitada nesta página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há uma próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor da próxima página, ou null.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor da página anterior, ou null.
	PreviousBefore *string `json:"previous_before"`
}

PaymentLinkListPage contains the fields defined by the public API.

func (PaymentLinkListPage) MarshalJSON

func (v PaymentLinkListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLinkListPage) UnmarshalJSON

func (v *PaymentLinkListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLinkListPage response.

type PaymentLinkListResponse

type PaymentLinkListResponse struct {
	Resource `json:"-"`
	// List Links presentes nesta página.
	List []PaymentLink `json:"list"`
	// Page Cursores para navegar entre páginas.
	Page PaymentLinkListPage `json:"page"`
}

PaymentLinkListResponse contains the fields defined by the public API.

func (PaymentLinkListResponse) MarshalJSON

func (v PaymentLinkListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLinkListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*PaymentLinkListResponse) PreviousPage

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*PaymentLinkListResponse) UnmarshalJSON

func (v *PaymentLinkListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLinkListResponse response.

type PaymentLinkUnavailableReason

type PaymentLinkUnavailableReason struct {
	Resource `json:"-"`
	// Code Código do impedimento. Use esse valor para decidir o tratamento da integração.
	Code string `json:"code"`
	// Message Explicação em inglês para diagnóstico. O texto pode ser aprimorado sem mudar o código; não o use para controlar a integração.
	Message string `json:"message"`
}

PaymentLinkUnavailableReason Motivo que impede pagar a cobrança pelo link. O link continua disponível para consulta.

func (PaymentLinkUnavailableReason) MarshalJSON

func (v PaymentLinkUnavailableReason) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentLinkUnavailableReason) UnmarshalJSON

func (v *PaymentLinkUnavailableReason) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentLinkUnavailableReason response.

type PaymentLinksService

type PaymentLinksService struct {
	// contains filtered or unexported fields
}

PaymentLinksService provides the endpoints available through Client.PaymentLinks.

func (*PaymentLinksService) Create

Create Criar ou recuperar um link de pagamento

func (*PaymentLinksService) Get

Get Recuperar um link de pagamento

func (*PaymentLinksService) List

List Listar links de pagamento

func (*PaymentLinksService) ListAll

ListAll lazily follows forward cursors and preserves the original filters.

func (*PaymentLinksService) SendEmail

SendEmail Enviar link por e-mail

func (*PaymentLinksService) Update

Update Atualizar um link de pagamento

type PaymentReceipt

type PaymentReceipt struct {
	Resource `json:"-"`
	// ChargeID Identificador público da cobrança paga.
	ChargeID string `json:"charge_id"`
	// CustomerID Identificador público do cliente vinculado à cobrança.
	CustomerID string `json:"customer_id"`
	// AmountCents Valor original da cobrança paga, em centavos de real, sem descontar tarifas ou devoluções.
	AmountCents int64 `json:"amount_cents"`
	// PaymentMethod Meio registrado no pagamento: 1 Pix, 2 boleto, 3 cartão de crédito ou 4 cartão de débito. O código 0 indica meio não informado.
	PaymentMethod int64 `json:"payment_method"`
	// PaidAt Data e hora do pagamento confirmado, em segundos Unix UTC.
	PaidAt int64 `json:"paid_at"`
	// Customer Dados cadastrais do cliente associados à cobrança. Não comprovam a identidade bancária de quem efetuou o pagamento.
	Customer ReceiptParty `json:"customer"`
	// Merchant Dados cadastrais da empresa recebedora.
	Merchant ReceiptParty `json:"merchant"`
	// IsSandbox Indica que o pagamento pertence ao Sandbox e não movimentou dinheiro real.
	IsSandbox bool `json:"is_sandbox"`
	// IsFiscalDocument Sempre false. O recibo da Raims não substitui nota fiscal.
	IsFiscalDocument bool `json:"is_fiscal_document"`
	// EndToEndID Identificador bancário do recebimento Pix, quando disponível. Retorna null no Sandbox, nos pagamentos por boleto e quando o identificador do recebimento não está confirmado. É diferente do ID da cobrança e dos dados de emissão do Pix.
	EndToEndID *string `json:"end_to_end_id"`
}

PaymentReceipt Pagamento confirmado e identificação cadastral das partes da cobrança. O valor corresponde ao recebimento original, sem descontar estornos ou tarifas.

func (PaymentReceipt) MarshalJSON

func (v PaymentReceipt) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*PaymentReceipt) UnmarshalJSON

func (v *PaymentReceipt) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public PaymentReceipt response.

type ProtocolError

type ProtocolError struct {
	// Reason describes the protocol mismatch without including payloads.
	Reason string
	// Response contains HTTP metadata when a response was received.
	Response *Response
}

ProtocolError indicates an unexpected status, body, or pagination cursor.

func (*ProtocolError) Error

func (e *ProtocolError) Error() string

Error returns the protocol mismatch description.

type ReceiptParty

type ReceiptParty struct {
	Resource `json:"-"`
	// Name Nome cadastral, ou null quando não informado.
	Name *string `json:"name"`
	// TaxID CPF ou CNPJ cadastral, ou null quando não informado.
	TaxID *string `json:"tax_id"`
}

ReceiptParty Nome e documento cadastrais associados à cobrança, sem dados de conta bancária.

func (ReceiptParty) MarshalJSON

func (v ReceiptParty) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*ReceiptParty) UnmarshalJSON

func (v *ReceiptParty) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public ReceiptParty response.

type Refund

type Refund struct {
	Resource `json:"-"`
	// ID Identificador público da solicitação de estorno.
	ID string `json:"id"`
	// ChargeID Identificador da cobrança que recebeu o pagamento original.
	ChargeID string `json:"charge_id"`
	// AmountCents Valor solicitado para devolução, em centavos de real.
	AmountCents int64 `json:"amount_cents"`
	// Description Descrição da solicitação, ou null quando não informada.
	Description *string `json:"description"`
	// Status Estado atual: reserved para solicitação em preparação, accepted para pedido aceito e aguardando confirmação, completed para devolução concluída, failed para falha confirmada e unknown para resultado ainda não confirmado. Consulte a mesma solicitação enquanto não houver resultado confirmado.
	Status string `json:"status"`
	// CreatedAt Data da solicitação, em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// CompletedAt Data da confirmação da devolução, em segundos Unix UTC, ou null.
	CompletedAt *int64 `json:"completed_at"`
	// FailedAt Data da falha confirmada, em segundos Unix UTC, ou null.
	FailedAt *int64 `json:"failed_at"`
	// FailureReason Motivo disponível quando o estado é failed, ou null nos demais estados. Uma falha sem causa registrada usa REFUND_FAILURE_REASON_UNAVAILABLE; não presuma que o pedido foi rejeitado.
	FailureReason *RefundFailureReason `json:"failure_reason"`
}

Refund Solicitação de devolução Pix vinculada a uma cobrança.

func (Refund) MarshalJSON

func (v Refund) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Refund) UnmarshalJSON

func (v *Refund) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Refund response.

type RefundEligibility

type RefundEligibility struct {
	Resource `json:"-"`
	// ChargeID Identificador público da cobrança consultada.
	ChargeID string `json:"charge_id"`
	// Eligible Indica se a cobrança pode receber um pedido de devolução nas condições atuais.
	Eligible bool `json:"eligible"`
	// Reason Motivo que impede a devolução, ou null quando eligible for true. Quando o impedimento for o estado, a mensagem informa o estado atual da cobrança e os estados aceitos.
	Reason *RefundUnavailableReason `json:"reason"`
	// RefundableAmountCents Valor restante da cobrança que pode ser devolvido, em centavos de real. O máximo disponível para um pedido agora está em max_refund_amount_cents.
	RefundableAmountCents int64 `json:"refundable_amount_cents"`
	// PendingAmountCents Valor de solicitações que ainda aguardam resultado, em centavos de real.
	PendingAmountCents int64 `json:"pending_amount_cents"`
	// MaxRefundAmountCents Máximo que pode ser solicitado agora, em centavos de real, considerando o restante da cobrança e o saldo disponível. Zero quando houver impedimento. A consulta não reserva esse valor.
	MaxRefundAmountCents int64 `json:"max_refund_amount_cents"`
}

RefundEligibility Disponibilidade atual para solicitar um estorno Pix.

func (RefundEligibility) MarshalJSON

func (v RefundEligibility) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RefundEligibility) UnmarshalJSON

func (v *RefundEligibility) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RefundEligibility response.

type RefundFailureReason

type RefundFailureReason struct {
	Resource `json:"-"`
	// Code Código da causa confirmada. REFUND_FAILURE_REASON_UNAVAILABLE informa que a causa não está disponível.
	Code string `json:"code"`
	// Message Explicação em inglês e orientação para acompanhamento. Use code para tratar a causa; não dependa do texto literal.
	Message string `json:"message"`
}

RefundFailureReason Causa pública de uma falha confirmada na solicitação de estorno.

func (RefundFailureReason) MarshalJSON

func (v RefundFailureReason) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RefundFailureReason) UnmarshalJSON

func (v *RefundFailureReason) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RefundFailureReason response.

type RefundListPage

type RefundListPage struct {
	Resource `json:"-"`
	// PageSize Quantidade de estornos solicitada nesta página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há uma próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor da próxima página, ou null.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor da página anterior, ou null.
	PreviousBefore *string `json:"previous_before"`
}

RefundListPage Informações para navegar pela mesma listagem de estornos.

func (RefundListPage) MarshalJSON

func (v RefundListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RefundListPage) UnmarshalJSON

func (v *RefundListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RefundListPage response.

type RefundListResponse

type RefundListResponse struct {
	Resource `json:"-"`
	// List Estornos presentes nesta página, dos mais recentes para os mais antigos.
	List []Refund `json:"list"`
	// Page Cursores para continuar a mesma listagem, com a mesma empresa, ambiente e cobrança quando informada.
	Page RefundListPage `json:"page"`
}

RefundListResponse Página de solicitações de estorno no escopo consultado.

func (RefundListResponse) MarshalJSON

func (v RefundListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RefundListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*RefundListResponse) PreviousPage

func (v *RefundListResponse) PreviousPage(ctx context.Context) (*RefundListResponse, error)

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*RefundListResponse) UnmarshalJSON

func (v *RefundListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RefundListResponse response.

type RefundUnavailableReason

type RefundUnavailableReason struct {
	Resource `json:"-"`
	// Code Código do impedimento. Use esse valor para definir o tratamento na integração.
	Code string `json:"code"`
	// Message Explicação em inglês para diagnóstico. O texto pode melhorar sem mudar o código; não o use para controlar a integração.
	Message string `json:"message"`
}

RefundUnavailableReason Condição que impede um pedido de devolução.

func (RefundUnavailableReason) MarshalJSON

func (v RefundUnavailableReason) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RefundUnavailableReason) UnmarshalJSON

func (v *RefundUnavailableReason) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RefundUnavailableReason response.

type RefundsService

type RefundsService struct {
	// contains filtered or unexported fields
}

RefundsService provides the endpoints available through Client.Refunds.

func (*RefundsService) Get

func (s *RefundsService) Get(ctx context.Context, id string, options ...RequestOption) (*Refund, error)

Get Recuperar um estorno

func (*RefundsService) GetReceipt

func (s *RefundsService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)

GetReceipt Baixar comprovante de estorno

func (*RefundsService) List

List Listar estornos

func (*RefundsService) ListAll

func (s *RefundsService) ListAll(ctx context.Context, params *ListRefundsParams, options ...RequestOption) *Iterator[Refund]

ListAll lazily follows forward cursors and preserves the original filters.

type RemoveCustomersParams

type RemoveCustomersParams struct {
	// Identifiers IDs dos clientes que deseja remover. IDs repetidos não geram mais de uma remoção. IDs inválidos ou de clientes que a chave não pode acessar aparecem em invalid.
	Identifiers Optional[[]*string] `json:"identifiers,omitzero"`
}

RemoveCustomersParams contains the fields defined by the public API.

type RequestDiagnostics

type RequestDiagnostics struct {
	// Method is the HTTP method of the attempt.
	Method string
	// Path is the endpoint template, with placeholders instead of resource IDs.
	Path string
	// Attempt starts at one and increases for each eligible read retry.
	Attempt int
	// Duration covers transport and response-body reading, before the observer runs.
	Duration time.Duration
	// StatusCode is zero when no HTTP response was received.
	StatusCode int
	// RequestID is the response correlation identifier, when available.
	RequestID string
}

RequestDiagnostics contains no credentials, resource IDs, queries or payloads.

type RequestOption

type RequestOption func(*requestConfig) error

RequestOption configures a single request and is validated before HTTP is sent. Collection navigation preserves the options of its original request.

func WithIdempotencyKey

func WithIdempotencyKey(key string) RequestOption

WithIdempotencyKey sends a persisted key for an endpoint that accepts idempotency. The key must contain 1 to 255 visible ASCII characters without spaces. Keep the same key and parameters when repeating the same intention.

func WithRequestTimeout

func WithRequestTimeout(timeout time.Duration) RequestOption

WithRequestTimeout overrides the positive timeout of each HTTP attempt for this call. It includes response-body reading. Use a context deadline to bound retries and backoff.

type ResolveChargeScenarioParams

type ResolveChargeScenarioParams struct {
	// Action Ação a testar: pix_issuance para emissão Pix, boleto_issuance para emissão de boleto ou cancellation para cancelamento.
	Action Optional[string] `json:"action,omitzero"`
	// Outcome Resultado para a pendência: completed conclui a ação; failed confirma a falha.
	Outcome Optional[string] `json:"outcome,omitzero"`
}

ResolveChargeScenarioParams Ação pendente e resultado da simulação.

type Resource

type Resource struct {
	// LastResponse contains HTTP metadata for a resource returned by a client call.
	LastResponse *Response `json:"-"`
	// RawJSON preserves the original bytes of this object, including future fields.
	RawJSON json.RawMessage `json:"-"`
	// ExtraFields contains editable future fields with bytes independent of RawJSON.
	ExtraFields map[string]json.RawMessage `json:"-"`
	// contains filtered or unexported fields
}

Resource retains the original fields, including future fields and explicit nulls.

func (Resource) HasField

func (r Resource) HasField(name string) bool

HasField reports whether the received object contained the exact JSON property name. Edits to typed properties or ExtraFields do not change this original presence metadata.

func (Resource) IsNull

func (r Resource) IsNull(name string) bool

IsNull reports whether the received property was explicitly null. Omitted properties return false; edits to typed properties or ExtraFields do not change it.

type Response

type Response struct {
	// StatusCode is the received HTTP status; 202 indicates a pending result.
	StatusCode int
	// RequestID is the response correlation identifier, when available.
	RequestID string
	// RetryAfter is the parsed scheduling hint, capped at 24 hours.
	RetryAfter time.Duration
	// IdempotencyReplayed reports the API's Idempotency-Replayed header.
	IdempotencyReplayed bool
}

Response contains metadata only. Status 202 indicates a pending result.

type RevokeChargeResult

type RevokeChargeResult struct {
	Resource `json:"-"`
	// ID Identificador público da cobrança.
	ID string `json:"id"`
	// Status Estado atual da cobrança, considerando o vencimento.
	Status int64 `json:"status"`
	// Revoked Indica que a revogação foi confirmada.
	Revoked bool `json:"revoked"`
	// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
	RevocationPending bool `json:"revocation_pending"`
}

RevokeChargeResult contains the fields defined by the public API.

func (RevokeChargeResult) MarshalJSON

func (v RevokeChargeResult) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*RevokeChargeResult) UnmarshalJSON

func (v *RevokeChargeResult) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public RevokeChargeResult response.

type RotateWebhookSecretParams

type RotateWebhookSecretParams struct {
	// GracePeriodSeconds Período em que o segredo anterior pode continuar assinando envios. Zero gera uma nova assinatura e encerra a validade dos segredos anteriores, inclusive durante uma transição ativa. Requisições já autorizadas ou em andamento podem chegar com a assinatura anterior.
	GracePeriodSeconds Optional[int64] `json:"grace_period_seconds,omitzero"`
}

RotateWebhookSecretParams Prazo de transição entre os segredos de assinatura.

type SetWebhookPauseParams

type SetWebhookPauseParams struct {
	// IsPaused Envie true para pausar os envios ou false para retomá-los. Repetir o mesmo valor preserva o estado e a data de pausa.
	IsPaused Optional[bool] `json:"is_paused,omitzero"`
}

SetWebhookPauseParams contains the fields defined by the public API.

type SignatureError

type SignatureError struct {
	// contains filtered or unexported fields
}

SignatureError reports an invalid webhook signature, timestamp, or body. It does not retain the payload, signing headers, or secret.

func (*SignatureError) Error

func (e *SignatureError) Error() string

Error describes the signature failure without retaining the secret or payload.

type SimulationChargesService

type SimulationChargesService struct {
	// contains filtered or unexported fields
}

SimulationChargesService provides the endpoints available through Client.Simulations.Charges.

func (*SimulationChargesService) CompensateBoleto

func (s *SimulationChargesService) CompensateBoleto(ctx context.Context, id string, options ...RequestOption) (*ChargeBoletoCompensation, error)

CompensateBoleto Simular compensação de boleto

func (*SimulationChargesService) ConfigureScenario

func (s *SimulationChargesService) ConfigureScenario(ctx context.Context, id string, params *ChargeScenarioParams, options ...RequestOption) (*ChargeScenario, error)

ConfigureScenario Preparar cenário

func (*SimulationChargesService) ConfirmPayment

func (s *SimulationChargesService) ConfirmPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)

ConfirmPayment Confirmar pagamento

func (*SimulationChargesService) CreateRefund

func (s *SimulationChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, options ...RequestOption) (*Refund, error)

CreateRefund Simular estorno pendente

func (*SimulationChargesService) FailPayment

func (s *SimulationChargesService) FailPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)

FailPayment Simular falha no pagamento

func (*SimulationChargesService) IssuePayment

func (s *SimulationChargesService) IssuePayment(ctx context.Context, id string, params *IssueSimulationPaymentParams, options ...RequestOption) (*Charge, error)

IssuePayment Emitir pagamento de teste

func (*SimulationChargesService) ResolveScenario

func (s *SimulationChargesService) ResolveScenario(ctx context.Context, id string, params *ResolveChargeScenarioParams, options ...RequestOption) (*ChargeScenario, error)

ResolveScenario Resolver cenário pendente

type SimulationRefundsService

type SimulationRefundsService struct {
	// contains filtered or unexported fields
}

SimulationRefundsService provides the endpoints available through Client.Simulations.Refunds.

func (*SimulationRefundsService) Complete

func (s *SimulationRefundsService) Complete(ctx context.Context, id string, options ...RequestOption) (*Refund, error)

Complete Concluir estorno simulado

func (*SimulationRefundsService) Fail

func (s *SimulationRefundsService) Fail(ctx context.Context, id string, options ...RequestOption) (*Refund, error)

Fail Simular falha no estorno

type SimulationsService

type SimulationsService struct {
	// Charges provides charge payment and scenario simulations.
	Charges *SimulationChargesService
	// Refunds provides refund completion and failure simulations.
	Refunds *SimulationRefundsService
}

SimulationsService groups the endpoints that require Sandbox credentials.

type Statement

type Statement struct {
	Resource `json:"-"`
	// ID Identificador público do lançamento, com prefixo st_.
	ID string `json:"id"`
	// ReferenceID Identificador do recurso relacionado, ou null quando não houver referência. Cobranças usam ch_, contestações usam dp_, saques usam wd_ e ajustes usam adj_. Referências manuais podem não ter prefixo.
	ReferenceID *string `json:"reference_id"`
	// ReferenceType Categoria da referência: 1 cobrança; 2 contestação; 3 saque; 4 ajuste; 5 lançamento manual. Retorna null quando não houver referência.
	ReferenceType *int64 `json:"reference_type"`
	// StatementType Natureza do lançamento. Recebimentos, créditos por ajuste e liberações têm valor positivo; tarifas, saques, devoluções, débitos por ajuste e bloqueios têm valor negativo.
	StatementType int64 `json:"statement_type"`
	// AmountCents Valor assinado do lançamento em centavos de real. Por exemplo, 10000 representa R$ 100,00 e -149 representa uma saída de R$ 1,49.
	AmountCents int64 `json:"amount_cents"`
	// CreatedAt Instante do lançamento em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// RefundID ID do estorno que originou o lançamento, ou null quando não houver vínculo confirmado.
	RefundID *string `json:"refund_id"`
	// DisputeID ID da contestação vinculada ao lançamento, ou null quando não houver vínculo confirmado. Um bloqueio sem contestação identificada mantém este campo nulo.
	DisputeID *string `json:"dispute_id"`
}

Statement contains the fields defined by the public API.

func (Statement) MarshalJSON

func (v Statement) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Statement) UnmarshalJSON

func (v *Statement) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Statement response.

type StatementListPage

type StatementListPage struct {
	Resource `json:"-"`
	// PageSize Tamanho efetivo da página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há uma próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para after na próxima consulta, ou null no fim da lista.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para before na consulta anterior, ou null no início da lista.
	PreviousBefore *string `json:"previous_before"`
}

StatementListPage contains the fields defined by the public API.

func (StatementListPage) MarshalJSON

func (v StatementListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*StatementListPage) UnmarshalJSON

func (v *StatementListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public StatementListPage response.

type StatementListResponse

type StatementListResponse struct {
	Resource `json:"-"`
	// List Lançamentos da página, na ordem solicitada.
	List []Statement `json:"list"`
	// Page Tamanho da página e cursores para avançar ou voltar.
	Page StatementListPage `json:"page"`
}

StatementListResponse contains the fields defined by the public API.

func (StatementListResponse) MarshalJSON

func (v StatementListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*StatementListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*StatementListResponse) PreviousPage

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*StatementListResponse) UnmarshalJSON

func (v *StatementListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public StatementListResponse response.

type StatementsService

type StatementsService struct {
	// contains filtered or unexported fields
}

StatementsService provides the endpoints available through Client.Statements.

func (*StatementsService) Get

func (s *StatementsService) Get(ctx context.Context, id string, options ...RequestOption) (*Statement, error)

Get Recuperar um lançamento

func (*StatementsService) List

List Recuperar extrato

func (*StatementsService) ListAll

func (s *StatementsService) ListAll(ctx context.Context, params *ListStatementsParams, options ...RequestOption) *Iterator[Statement]

ListAll lazily follows forward cursors and preserves the original filters.

type UpdateAutomaticWithdrawalSettingsParams

type UpdateAutomaticWithdrawalSettingsParams struct {
	// Enabled Ativa ou desativa novas tentativas de saque. Desativar não cancela saques já solicitados.
	Enabled Optional[bool] `json:"enabled,omitzero"`
	// MinimumAmountCents Saldo mínimo para tentar o saque, em centavos de real. O valor retirado depende do saldo disponível e do limite Pix restante.
	MinimumAmountCents Optional[int64] `json:"minimum_amount_cents,omitzero"`
	// Time Horário diário no formato HH:mm, pelo fuso de São Paulo.
	Time Optional[string] `json:"time,omitzero"`
}

UpdateAutomaticWithdrawalSettingsParams Alterações da configuração de saque automático. Campos omitidos são preservados; null não é aceito.

type UpdateChargeParams

type UpdateChargeParams struct {
	// Title Título da cobrança. Omita para manter o título atual; envie null ou texto vazio para removê-lo.
	Title Optional[string] `json:"title,omitzero"`
	// Description Descrição da cobrança. Omita para manter a descrição atual; envie null ou texto vazio para removê-la.
	Description Optional[string] `json:"description,omitzero"`
	// ExternalReference Referência do pedido ou da cobrança no seu sistema. Omita para manter o valor atual; envie null ou texto vazio para removê-lo. Pode ser repetida em outras cobranças e é independente da referência do cliente.
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
	// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
	Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}

UpdateChargeParams contains the fields defined by the public API.

type UpdateCheckoutSettingsParams

type UpdateCheckoutSettingsParams struct {
	// SupportEmail E-mail de suporte apresentado no checkout. Omitir preserva o valor; null ou texto vazio remove o contato.
	SupportEmail Optional[string] `json:"support_email,omitzero"`
	// HexPrimaryColor Cor principal do checkout no formato #RRGGBB. Omitir preserva o valor; null ou texto vazio não são aceitos.
	HexPrimaryColor Optional[string] `json:"hex_primary_color,omitzero"`
	// HexSecondaryColor Cor de fundo do checkout no formato #RRGGBB. Omitir preserva o valor; null ou texto vazio não são aceitos.
	HexSecondaryColor Optional[string] `json:"hex_secondary_color,omitzero"`
	// LogoUploadID ID retornado ao preparar o envio da logo. Envie o arquivo antes de associá-lo. Omitir preserva a imagem atual; null a remove.
	LogoUploadID Optional[string] `json:"logo_upload_id,omitzero"`
	// FaviconUploadID ID retornado ao preparar o envio do ícone. Envie o arquivo antes de associá-lo. Omitir preserva a imagem atual; null a remove.
	FaviconUploadID Optional[string] `json:"favicon_upload_id,omitzero"`
}

UpdateCheckoutSettingsParams Alterações da aparência do checkout. Campos omitidos são preservados. Os identificadores de envio de imagem aceitam null para remover a imagem.

type UpdateCustomerParams

type UpdateCustomerParams struct {
	// FullName Nome completo do pagador. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	FullName Optional[string] `json:"full_name,omitzero"`
	// Email E-mail do pagador. Atualizar o e-mail não envia uma mensagem. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	Email Optional[string] `json:"email,omitzero"`
	// DialCode Código de discagem internacional. Pode ser informado sem phone_local. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	DialCode Optional[string] `json:"dial_code,omitzero"`
	// PhoneLocal Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	PhoneLocal Optional[string] `json:"phone_local,omitzero"`
	// ZipCode CEP do endereço, com ou sem hífen. Atualizar o CEP não preenche os outros campos de endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	ZipCode Optional[string] `json:"zip_code,omitzero"`
	// Street Logradouro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	Street Optional[string] `json:"street,omitzero"`
	// StreetNumber Número do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	StreetNumber Optional[string] `json:"street_number,omitzero"`
	// Complement Complemento do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	Complement Optional[string] `json:"complement,omitzero"`
	// Neigh Bairro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	Neigh Optional[string] `json:"neigh,omitzero"`
	// City Cidade do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	City Optional[string] `json:"city,omitzero"`
	// Uf Sigla do estado, como SP. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
	Uf Optional[string] `json:"uf,omitzero"`
	// ExternalReference Identificador do cliente no seu sistema. Omita para manter a referência atual; envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
	ExternalReference Optional[string] `json:"external_reference,omitzero"`
	// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
	Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}

UpdateCustomerParams Campos do perfil e dados de integração do cliente. Omita um campo para manter seu valor. Nos campos de texto, null ou texto vazio apagam o conteúdo. Em metadata, null remove todos os pares, {} preserva o mapa e null em uma chave remove somente essa chave. CPF/CNPJ e ID não podem ser alterados.

type UpdatePaymentLinkParams

type UpdatePaymentLinkParams struct {
	// IsActive Envie false para pausar o checkout e true para reativar a mesma URL. Omitir preserva o estado atual. A pausa não cancela Pix ou boleto emitidos nem prorroga o vencimento.
	IsActive Optional[bool] `json:"is_active,omitzero"`
	// SuccessRedirectURL URL HTTPS de retorno após o pagamento confirmado. Omitir, enviar null ou texto vazio preserva a URL existente. Para removê-la, use clear_success_redirect_url com true, sem informar uma URL preenchida.
	SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
	// CancelRedirectURL URL HTTPS para voltar ao seu site. Esse retorno não cancela a cobrança. Omitir, enviar null ou texto vazio preserva a URL existente. Para removê-la, use clear_cancel_redirect_url com true, sem informar uma URL preenchida.
	CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
	// ClearSuccessRedirectURL Envie true para remover o destino de retorno após o pagamento. False ou omissão não solicita remoção. Não envie true junto de success_redirect_url preenchida.
	ClearSuccessRedirectURL Optional[bool] `json:"clear_success_redirect_url,omitzero"`
	// ClearCancelRedirectURL Envie true para remover o destino de voltar ao site. False ou omissão não solicita remoção. Não envie true junto de cancel_redirect_url preenchida.
	ClearCancelRedirectURL Optional[bool] `json:"clear_cancel_redirect_url,omitzero"`
	// PaymentMethodTypes Meios permitidos no link. Omitir preserva a configuração; null remove a configuração própria. Uma lista limita os meios do checkout e não amplia os permitidos pela cobrança.
	PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
}

UpdatePaymentLinkParams contains the fields defined by the public API.

type UpdateWebhookParams

type UpdateWebhookParams struct {
	// Name Novo nome do webhook.
	Name Optional[string] `json:"name,omitzero"`
	// URL Nova URL HTTPS que recebe os eventos, na porta padrão 443.
	URL Optional[string] `json:"url,omitzero"`
	// Events Lista completa dos eventos que o destino deve receber. Ela substitui a seleção anterior.
	Events Optional[[]string] `json:"events,omitzero"`
	// IsActive Use true para permitir envios ou false para desativar o destino.
	IsActive Optional[bool] `json:"is_active,omitzero"`
}

UpdateWebhookParams Campos do webhook a alterar. Omita os campos que deseja manter.

type ValidationError

type ValidationError struct {
	// Field identifies the argument or request property to correct.
	Field string
	// Reason describes the rejected argument without including its value.
	Reason string
}

ValidationError is detected before sending a request.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error identifies the invalid argument and the required correction.

type Webhook

type Webhook struct {
	Resource `json:"-"`
	// ID Identificador público do webhook.
	ID string `json:"id"`
	// Name Nome usado para identificar o destino.
	Name string `json:"name"`
	// URL URL HTTPS cadastrada para receber os eventos.
	URL string `json:"url"`
	// Events Códigos dos eventos assinados por este destino.
	Events []string `json:"events"`
	// IsActive Indica se o webhook está ativo para receber eventos.
	IsActive bool `json:"is_active"`
	// DisabledReason Motivo da desativação: manual para uma ação do cliente; continuous_failure pode aparecer em cadastros desativados anteriormente por falhas. Retorna null quando o webhook está ativo.
	DisabledReason *string `json:"disabled_reason"`
	// DisabledAt Instante da desativação, em segundos Unix UTC, ou null quando o webhook está ativo ou essa data não foi registrada.
	DisabledAt *int64 `json:"disabled_at"`
	// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
	PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
	// CreatedAt Instante do cadastro, em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Instante da última alteração do cadastro, em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
	// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
	IsPaused bool `json:"is_paused"`
	// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
	PausedAt *int64 `json:"paused_at"`
}

Webhook Configuração de um destino para eventos.

func (Webhook) MarshalJSON

func (v Webhook) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Webhook) UnmarshalJSON

func (v *Webhook) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Webhook response.

type WebhookCreated

type WebhookCreated struct {
	Resource `json:"-"`
	// ID Identificador público do webhook.
	ID string `json:"id"`
	// Name Nome usado para identificar o destino.
	Name string `json:"name"`
	// URL URL HTTPS cadastrada para receber os eventos.
	URL string `json:"url"`
	// Events Códigos dos eventos assinados por este destino.
	Events []string `json:"events"`
	// IsActive Indica se o webhook está ativo para receber eventos.
	IsActive bool `json:"is_active"`
	// DisabledReason Motivo da desativação: manual para uma ação do cliente; continuous_failure pode aparecer em cadastros desativados anteriormente por falhas. Retorna null quando o webhook está ativo.
	DisabledReason *string `json:"disabled_reason"`
	// DisabledAt Instante da desativação, em segundos Unix UTC, ou null quando o webhook está ativo ou essa data não foi registrada.
	DisabledAt *int64 `json:"disabled_at"`
	// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
	PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
	// CreatedAt Instante do cadastro, em segundos Unix UTC.
	CreatedAt int64 `json:"created_at"`
	// UpdatedAt Instante da última alteração do cadastro, em segundos Unix UTC.
	UpdatedAt int64 `json:"updated_at"`
	// SecretKey Segredo usado para validar a assinatura dos eventos. Guarde-o em local seguro; as consultas do cadastro não o retornam.
	SecretKey string `json:"secret_key"`
	// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
	IsPaused bool `json:"is_paused"`
	// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
	PausedAt *int64 `json:"paused_at"`
}

WebhookCreated Webhook cadastrado e segredo necessário para validar suas assinaturas.

func (WebhookCreated) MarshalJSON

func (v WebhookCreated) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookCreated) UnmarshalJSON

func (v *WebhookCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookCreated response.

type WebhookEventType

type WebhookEventType struct {
	Resource `json:"-"`
	// Code Código usado no campo events do cadastro e da atualização.
	Code string `json:"code"`
}

WebhookEventType Um evento disponível para assinatura.

func (WebhookEventType) MarshalJSON

func (v WebhookEventType) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookEventType) UnmarshalJSON

func (v *WebhookEventType) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookEventType response.

type WebhookEventTypeListResponse

type WebhookEventTypeListResponse struct {
	Resource `json:"-"`
	// List Catálogo de eventos disponíveis.
	List []WebhookEventType `json:"list"`
}

WebhookEventTypeListResponse Eventos disponíveis para novas assinaturas.

func (WebhookEventTypeListResponse) MarshalJSON

func (v WebhookEventTypeListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookEventTypeListResponse) UnmarshalJSON

func (v *WebhookEventTypeListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookEventTypeListResponse response.

type WebhookEventTypesService

type WebhookEventTypesService struct {
	// contains filtered or unexported fields
}

WebhookEventTypesService provides the endpoints available through Client.WebhookEventTypes.

func (*WebhookEventTypesService) List

List Listar os eventos disponíveis

type WebhookHealth

type WebhookHealth struct {
	Resource `json:"-"`
	// WebhookID Identificador do webhook consultado.
	WebhookID string `json:"webhook_id"`
	// Status Situação conhecida do destino: unknown quando faltam dados, healthy após sucesso, failing durante uma sequência de falhas ou disabled quando está desativado.
	Status string `json:"status"`
	// FirstFailureAt Início da sequência atual de falhas, em segundos Unix UTC, ou null quando não há sequência de falhas informada.
	FirstFailureAt *int64 `json:"first_failure_at"`
	// LastFailureAt Última falha da sequência atual, em segundos Unix UTC, ou null quando não há sequência de falhas informada.
	LastFailureAt *int64 `json:"last_failure_at"`
	// LastSuccessAt Último sucesso conhecido para a configuração atual, em segundos Unix UTC, ou null quando esse dado não está disponível.
	LastSuccessAt *int64 `json:"last_success_at"`
	// FailureDurationSeconds Tempo desde a primeira falha da sequência atual até esta consulta, em segundos. Retorna null quando o estado não é failing ou não há dados suficientes.
	FailureDurationSeconds *int64 `json:"failure_duration_seconds"`
	// ObservedAt Instante de atualização dos dados apresentados, em segundos Unix UTC, ou null quando não há informação disponível.
	ObservedAt *int64 `json:"observed_at"`
}

WebhookHealth Situação conhecida das entregas de um webhook.

func (WebhookHealth) MarshalJSON

func (v WebhookHealth) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookHealth) UnmarshalJSON

func (v *WebhookHealth) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookHealth response.

type WebhookListPage

type WebhookListPage struct {
	Resource `json:"-"`
	// PageSize Quantidade efetiva de registros por página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há outra página para avançar.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há outra página para voltar.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para usar em after, ou null quando não há próxima página.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para usar em before, ou null quando não há página anterior.
	PreviousBefore *string `json:"previous_before"`
}

WebhookListPage Paginação dos webhooks.

func (WebhookListPage) MarshalJSON

func (v WebhookListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookListPage) UnmarshalJSON

func (v *WebhookListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookListPage response.

type WebhookListResponse

type WebhookListResponse struct {
	Resource `json:"-"`
	// List Webhooks desta página.
	List []Webhook `json:"list"`
	// Page Informações para continuar ou voltar na listagem.
	Page WebhookListPage `json:"page"`
}

WebhookListResponse Página de webhooks cadastrados.

func (WebhookListResponse) MarshalJSON

func (v WebhookListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*WebhookListResponse) PreviousPage

func (v *WebhookListResponse) PreviousPage(ctx context.Context) (*WebhookListResponse, error)

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*WebhookListResponse) UnmarshalJSON

func (v *WebhookListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookListResponse response.

type WebhookPause

type WebhookPause struct {
	Resource `json:"-"`
	// ID Identificador do webhook.
	ID string `json:"id"`
	// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
	IsPaused bool `json:"is_paused"`
	// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
	PausedAt *int64 `json:"paused_at"`
}

WebhookPause contains the fields defined by the public API.

func (WebhookPause) MarshalJSON

func (v WebhookPause) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookPause) UnmarshalJSON

func (v *WebhookPause) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookPause response.

type WebhookSecretRotation

type WebhookSecretRotation struct {
	Resource `json:"-"`
	// ID Identificador público do webhook.
	ID string `json:"id"`
	// SecretKey Segredo usado para validar a assinatura dos eventos. Guarde-o em local seguro; as consultas do cadastro não o retornam.
	SecretKey string `json:"secret_key"`
	// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
	PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
}

WebhookSecretRotation Novo segredo de assinatura e validade do segredo anterior.

func (WebhookSecretRotation) MarshalJSON

func (v WebhookSecretRotation) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookSecretRotation) UnmarshalJSON

func (v *WebhookSecretRotation) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookSecretRotation response.

type WebhookTestAccepted

type WebhookTestAccepted struct {
	Resource `json:"-"`
	// EventID Identificador do evento técnico solicitado.
	EventID string `json:"event_id"`
	// DeliveryID Identificador da entrega para acompanhar o resultado.
	DeliveryID string `json:"delivery_id"`
}

WebhookTestAccepted Pedido de teste aceito para um único destino.

func (WebhookTestAccepted) MarshalJSON

func (v WebhookTestAccepted) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WebhookTestAccepted) UnmarshalJSON

func (v *WebhookTestAccepted) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WebhookTestAccepted response.

type WebhooksService

type WebhooksService struct {
	// contains filtered or unexported fields
}

WebhooksService provides the endpoints available through Client.Webhooks.

func (*WebhooksService) Create

func (s *WebhooksService) Create(ctx context.Context, params *CreateWebhookParams, options ...RequestOption) (*WebhookCreated, error)

Create Criar um webhook

func (*WebhooksService) Delete

func (s *WebhooksService) Delete(ctx context.Context, webhook_id string, options ...RequestOption) (*Response, error)

Delete Excluir um webhook

func (*WebhooksService) Get

func (s *WebhooksService) Get(ctx context.Context, webhook_id string, options ...RequestOption) (*Webhook, error)

Get Recuperar um webhook

func (*WebhooksService) GetHealth

func (s *WebhooksService) GetHealth(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookHealth, error)

GetHealth Consultar as falhas de um webhook

func (*WebhooksService) List

List Listar webhooks

func (*WebhooksService) ListAll

func (s *WebhooksService) ListAll(ctx context.Context, params *ListWebhooksParams, options ...RequestOption) *Iterator[Webhook]

ListAll lazily follows forward cursors and preserves the original filters.

func (*WebhooksService) RotateSecret

func (s *WebhooksService) RotateSecret(ctx context.Context, webhook_id string, params *RotateWebhookSecretParams, options ...RequestOption) (*WebhookSecretRotation, error)

RotateSecret Rotacionar o segredo de assinatura

func (*WebhooksService) SetPause

func (s *WebhooksService) SetPause(ctx context.Context, webhook_id string, params *SetWebhookPauseParams, options ...RequestOption) (*WebhookPause, error)

SetPause Pausar ou retomar envios

func (*WebhooksService) Test

func (s *WebhooksService) Test(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookTestAccepted, error)

Test Enviar um evento de teste

func (*WebhooksService) Update

func (s *WebhooksService) Update(ctx context.Context, webhook_id string, params *UpdateWebhookParams, options ...RequestOption) (*Webhook, error)

Update Atualizar um webhook

type Withdrawal

type Withdrawal struct {
	Resource `json:"-"`
	// ID Identificador público do saque, com prefixo wd_. Também pode aparecer como reference_id no extrato.
	ID string `json:"id"`
	// AmountCents Valor solicitado para saque, em centavos de real, incluindo a tarifa. Um saque pendente, com falha ou cancelado não confirma a transferência desse valor.
	AmountCents int64 `json:"amount_cents"`
	// FeeAmountCents Tarifa do saque, em centavos de real. A tarifa é cobrada quando o saque é concluído; falha ou cancelamento não confirma cobrança.
	FeeAmountCents int64 `json:"fee_amount_cents"`
	// NetAmountCents Valor destinado à conta de destino, em centavos de real: amount_cents menos fee_amount_cents. Consulte status para saber se a transferência foi concluída.
	NetAmountCents int64 `json:"net_amount_cents"`
	// Status Estado atual do saque. PENDING: aguardando processamento; PROCESSING: em processamento; COMPLETED: concluído; FAILED: falhou; CANCELED: cancelado; UNKNOWN: estado sem classificação disponível. Apenas COMPLETED confirma a conclusão.
	Status string `json:"status"`
	// FailureReason Motivo conhecido da falha, ou null quando o saque não está em FAILED. Um motivo indisponível não deve ser interpretado como autorização para repetir o saque.
	FailureReason *WithdrawalFailureReason `json:"failure_reason"`
	// BankAccount Conta de destino registrada em um saque bancário, ou null quando não se aplica. O número da conta é apresentado parcialmente.
	BankAccount *WithdrawalBankAccount `json:"bank_account"`
	// PixDestination Destino Pix registrado para o saque, ou null quando não há dados disponíveis. A chave é apresentada parcialmente.
	PixDestination *WithdrawalPixDestination `json:"pix_destination"`
	// RequestedAt Instante da solicitação, em segundos Unix UTC.
	RequestedAt int64 `json:"requested_at"`
	// CompletedAt Instante da conclusão, em segundos Unix UTC, ou null quando não houve conclusão.
	CompletedAt *int64 `json:"completed_at"`
	// FailedAt Instante da falha, em segundos Unix UTC, ou null quando não houve falha.
	FailedAt *int64 `json:"failed_at"`
	// CanceledAt Instante do cancelamento, em segundos Unix UTC, ou null quando não houve cancelamento.
	CanceledAt *int64 `json:"canceled_at"`
}

Withdrawal contains the fields defined by the public API.

func (Withdrawal) MarshalJSON

func (v Withdrawal) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*Withdrawal) UnmarshalJSON

func (v *Withdrawal) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public Withdrawal response.

type WithdrawalBankAccount

type WithdrawalBankAccount struct {
	Resource `json:"-"`
	// BankCode Código do banco de destino registrado no saque.
	BankCode string `json:"bank_code"`
	// Branch Agência registrada no saque, com dígito quando informado, ou null.
	Branch *string `json:"branch"`
	// AccountNumberMasked Número parcialmente oculto da conta de destino, com dígito quando informado, ou null.
	AccountNumberMasked *string `json:"account_number_masked"`
}

WithdrawalBankAccount contains the fields defined by the public API.

func (WithdrawalBankAccount) MarshalJSON

func (v WithdrawalBankAccount) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalBankAccount) UnmarshalJSON

func (v *WithdrawalBankAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalBankAccount response.

type WithdrawalDestination

type WithdrawalDestination struct {
	Resource `json:"-"`
	// ID Identificador público do destino, com prefixo wdst_. Use-o para consultar este destino; ele não identifica uma solicitação de saque.
	ID string `json:"id"`
	// KeyType Tipo da chave Pix: CNPJ, chave aleatória (EVP), telefone (PHONE) ou e-mail (EMAIL).
	KeyType string `json:"key_type"`
	// KeyMasked Chave Pix parcialmente ocultada. A consulta não retorna o valor completo.
	KeyMasked string `json:"key_masked"`
	// HolderName Nome do titular associado ao destino verificado da empresa.
	HolderName string `json:"holder_name"`
	// BankIspb ISPB da instituição do destino. Preserve os zeros à esquerda.
	BankIspb string `json:"bank_ispb"`
	// IsDefault Informa se este é o destino padrão atual para solicitar saques.
	IsDefault bool `json:"is_default"`
	// VerifiedAt Data da verificação do destino, em segundos Unix UTC.
	VerifiedAt int64 `json:"verified_at"`
}

WithdrawalDestination Destino Pix verificado da própria empresa, disponível para consulta em Produção.

func (WithdrawalDestination) MarshalJSON

func (v WithdrawalDestination) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalDestination) UnmarshalJSON

func (v *WithdrawalDestination) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalDestination response.

type WithdrawalDestinationListPage

type WithdrawalDestinationListPage struct {
	Resource `json:"-"`
	// PageSize Tamanho considerado para esta página. Não representa necessariamente a quantidade de destinos em list.
	PageSize int64 `json:"page_size"`
	// HasNext Informa se existe uma próxima página. Continue mesmo quando list estiver vazia.
	HasNext bool `json:"has_next"`
	// HasPrevious Informa se existe uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para copiar em after na próxima consulta, ou null quando não houver próxima página.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para copiar em before na consulta anterior, ou null quando não houver página anterior.
	PreviousBefore *string `json:"previous_before"`
}

WithdrawalDestinationListPage Cursores da listagem de destinos. A presença de uma próxima página independe da quantidade de destinos retornados em list.

func (WithdrawalDestinationListPage) MarshalJSON

func (v WithdrawalDestinationListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalDestinationListPage) UnmarshalJSON

func (v *WithdrawalDestinationListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalDestinationListPage response.

type WithdrawalDestinationListResponse

type WithdrawalDestinationListResponse struct {
	Resource `json:"-"`
	// List Destinos próprios disponíveis nesta página. Pode estar vazia mesmo quando page.has_next for true.
	List []WithdrawalDestination `json:"list"`
	// Page Dados de navegação da listagem. Continue enquanto has_next for true.
	Page WithdrawalDestinationListPage `json:"page"`
}

WithdrawalDestinationListResponse Página de destinos próprios e dados para continuar a consulta.

func (WithdrawalDestinationListResponse) MarshalJSON

func (v WithdrawalDestinationListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalDestinationListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*WithdrawalDestinationListResponse) PreviousPage

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*WithdrawalDestinationListResponse) UnmarshalJSON

func (v *WithdrawalDestinationListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalDestinationListResponse response.

type WithdrawalDestinationsService

type WithdrawalDestinationsService struct {
	// contains filtered or unexported fields
}

WithdrawalDestinationsService provides the endpoints available through Client.WithdrawalDestinations.

func (*WithdrawalDestinationsService) Get

Get Recuperar um destino de saque

func (*WithdrawalDestinationsService) List

List Listar destinos de saque

func (*WithdrawalDestinationsService) ListAll

ListAll lazily follows forward cursors and preserves the original filters.

type WithdrawalFailureReason

type WithdrawalFailureReason struct {
	Resource `json:"-"`
	// Code Motivo registrado para a falha. Consulte os códigos e a orientação de tratamento em [Falhas de saque](/tipos-e-identificadores/financeiro#motivos-de-falha-do-saque).
	Code string `json:"code"`
	// Message Explicação da falha em inglês. O texto ajuda no diagnóstico; a integração deve usar code.
	Message string `json:"message"`
}

WithdrawalFailureReason contains the fields defined by the public API.

func (WithdrawalFailureReason) MarshalJSON

func (v WithdrawalFailureReason) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalFailureReason) UnmarshalJSON

func (v *WithdrawalFailureReason) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalFailureReason response.

type WithdrawalLimits

type WithdrawalLimits struct {
	Resource `json:"-"`
	// MinimumAmountCents Valor mínimo permitido por solicitação, em centavos de real.
	MinimumAmountCents int64 `json:"minimum_amount_cents"`
	// FeeThresholdAmountCents Valor solicitado a partir do qual a tarifa de saque é zero, em centavos de real.
	FeeThresholdAmountCents int64 `json:"fee_threshold_amount_cents"`
	// FeeBelowThresholdCents Tarifa descontada do valor solicitado quando ele fica abaixo de fee_threshold_amount_cents, em centavos de real.
	FeeBelowThresholdCents int64 `json:"fee_below_threshold_cents"`
	// AvailableAmountCents Saldo disponível para retirada, em centavos de real. A solicitação também precisa respeitar os limites e a tarifa aplicáveis.
	AvailableAmountCents int64 `json:"available_amount_cents"`
	// DestinationConfigured Indica se há destino Pix próprio cadastrado para o saque. No Sandbox, retorna false.
	DestinationConfigured bool `json:"destination_configured"`
	// Limits Limites Pix e consumo do período atual, ou null quando não houver limites disponíveis para consulta. No Sandbox, retorna null. Esse valor não significa que o saque esteja livre de limites.
	Limits *WithdrawalPeriodLimits `json:"limits"`
}

WithdrawalLimits Condições atuais para planejar a retirada. Valores monetários usam centavos de real. O aceite do saque depende da conferência das condições no momento da solicitação.

func (WithdrawalLimits) MarshalJSON

func (v WithdrawalLimits) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalLimits) UnmarshalJSON

func (v *WithdrawalLimits) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalLimits response.

type WithdrawalListPage

type WithdrawalListPage struct {
	Resource `json:"-"`
	// PageSize Tamanho efetivo da página.
	PageSize int64 `json:"page_size"`
	// HasNext Indica se há uma próxima página.
	HasNext bool `json:"has_next"`
	// HasPrevious Indica se há uma página anterior.
	HasPrevious bool `json:"has_previous"`
	// NextAfter Cursor para a próxima página, ou null.
	NextAfter *string `json:"next_after"`
	// PreviousBefore Cursor para a página anterior, ou null.
	PreviousBefore *string `json:"previous_before"`
}

WithdrawalListPage contains the fields defined by the public API.

func (WithdrawalListPage) MarshalJSON

func (v WithdrawalListPage) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalListPage) UnmarshalJSON

func (v *WithdrawalListPage) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalListPage response.

type WithdrawalListResponse

type WithdrawalListResponse struct {
	Resource `json:"-"`
	// List Saques da página, na ordem solicitada.
	List []Withdrawal `json:"list"`
	// Page Tamanho da página e cursores para avançar ou voltar.
	Page WithdrawalListPage `json:"page"`
}

WithdrawalListResponse contains the fields defined by the public API.

func (WithdrawalListResponse) MarshalJSON

func (v WithdrawalListResponse) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalListResponse) NextPage

NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.

func (*WithdrawalListResponse) PreviousPage

PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.

func (*WithdrawalListResponse) UnmarshalJSON

func (v *WithdrawalListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalListResponse response.

type WithdrawalPeriodLimits

type WithdrawalPeriodLimits struct {
	Resource `json:"-"`
	// DayLimitCents Limite diário de saques, em centavos de real. O dia de saque vai das 06:00 às 06:00 do dia seguinte, no horário de São Paulo.
	DayLimitCents int64 `json:"day_limit_cents"`
	// NightLimitCents Limite noturno de saques, em centavos de real, das 20:00 às 06:00 do dia seguinte. Esse valor faz parte do limite diário.
	NightLimitCents int64 `json:"night_limit_cents"`
	// PeriodLimitCents Limite aplicável ao período indicado por period, em centavos de real.
	PeriodLimitCents int64 `json:"period_limit_cents"`
	// PeriodUsedCents Valor que já compromete o limite do período, em centavos de real. Inclui saques ainda em processamento.
	PeriodUsedCents int64 `json:"period_used_cents"`
	// PeriodRemainingCents Valor restante no limite do período, em centavos de real. Não representa o saldo da conta.
	PeriodRemainingCents int64 `json:"period_remaining_cents"`
	// RequestMaximumAmountCents Teto informado para uma solicitação, em centavos de real, considerando os limites de saque. O saldo disponível e a tarifa também restringem o valor que pode ser solicitado.
	RequestMaximumAmountCents int64 `json:"request_maximum_amount_cents"`
	// Period Período vigente: day durante o período diurno ou night das 20:00 às 06:00, no horário de São Paulo.
	Period string `json:"period"`
	// PeriodEndsAt Término do período vigente, em segundos Unix UTC. Consulte novamente após esse instante para conferir as condições atualizadas.
	PeriodEndsAt int64 `json:"period_ends_at"`
}

WithdrawalPeriodLimits Limites e consumo de saque no período atual, pelo horário de São Paulo. O limite noturno faz parte do diário.

func (WithdrawalPeriodLimits) MarshalJSON

func (v WithdrawalPeriodLimits) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalPeriodLimits) UnmarshalJSON

func (v *WithdrawalPeriodLimits) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalPeriodLimits response.

type WithdrawalPixDestination

type WithdrawalPixDestination struct {
	Resource `json:"-"`
	// KeyType Tipo da chave usada no saque: CNPJ, EVP (aleatória), PHONE (telefone) ou EMAIL.
	KeyType string `json:"key_type"`
	// KeyMasked Chave Pix parcialmente oculta.
	KeyMasked string `json:"key_masked"`
	// HolderName Nome do titular do destino registrado no saque.
	HolderName string `json:"holder_name"`
	// BankIspb ISPB da instituição de destino.
	BankIspb string `json:"bank_ispb"`
}

WithdrawalPixDestination contains the fields defined by the public API.

func (WithdrawalPixDestination) MarshalJSON

func (v WithdrawalPixDestination) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalPixDestination) UnmarshalJSON

func (v *WithdrawalPixDestination) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalPixDestination response.

type WithdrawalSummary

type WithdrawalSummary struct {
	Resource `json:"-"`
	// ProcessingCount Quantidade de saques com situação PENDING ou PROCESSING.
	ProcessingCount int64 `json:"processing_count"`
	// ProcessingAmountCents Valor total solicitado nesses saques, incluindo a tarifa, em centavos de real. Não some este valor ao saldo disponível.
	ProcessingAmountCents int64 `json:"processing_amount_cents"`
}

WithdrawalSummary Resumo atual dos saques pendentes ou em processamento da empresa.

func (WithdrawalSummary) MarshalJSON

func (v WithdrawalSummary) MarshalJSON() ([]byte, error)

MarshalJSON encodes typed fields and future fields, preserving received field presence.

func (*WithdrawalSummary) UnmarshalJSON

func (v *WithdrawalSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and reads the public WithdrawalSummary response.

type WithdrawalsService

type WithdrawalsService struct {
	// contains filtered or unexported fields
}

WithdrawalsService provides the endpoints available through Client.Withdrawals.

func (*WithdrawalsService) Create

func (s *WithdrawalsService) Create(ctx context.Context, params *CreateWithdrawalParams, options ...RequestOption) (*Withdrawal, error)

Create Solicitar saque

func (*WithdrawalsService) Get

func (s *WithdrawalsService) Get(ctx context.Context, id string, options ...RequestOption) (*Withdrawal, error)

Get Recuperar um saque

func (*WithdrawalsService) GetAutomaticSettings

func (s *WithdrawalsService) GetAutomaticSettings(ctx context.Context, options ...RequestOption) (*AutomaticWithdrawalSettings, error)

GetAutomaticSettings Consultar saque automático

func (*WithdrawalsService) GetLimits

func (s *WithdrawalsService) GetLimits(ctx context.Context, options ...RequestOption) (*WithdrawalLimits, error)

GetLimits Consultar condições de saque

func (*WithdrawalsService) GetSummary

func (s *WithdrawalsService) GetSummary(ctx context.Context, options ...RequestOption) (*WithdrawalSummary, error)

GetSummary Consultar saques em processamento

func (*WithdrawalsService) List

List Listar saques

func (*WithdrawalsService) ListAll

ListAll lazily follows forward cursors and preserves the original filters.

func (*WithdrawalsService) UpdateAutomaticSettings

UpdateAutomaticSettings Atualizar saque automático

Directories

Path Synopsis
scripts
check-api command
Command check-api compares the exported SDK API with an independent baseline.
Command check-api compares the exported SDK API with an independent baseline.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL