payments

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package payments provides access to Circle's payments API and related functionality.

The Circle Payments API allows you to take payments from your end users via traditional methods such as debit & credit cards, bank accounts, etc., and receive settlement in USDC. Businesses with users already holding USDC are also able to take on-chain payments on supported blockchains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API The Circle Payments API allows you to take payments from your end users via traditional methods such as debit & credit cards, bank accounts, etc., and receive settlement in USDC. Businesses with users already holding USDC are also able to take on-chain payments on supported blockchains.

With the Circle Payments API you can:

  • Take card and bank transfer payments for goods or services.
  • Build a credit & debit card or bank transfer on-ramp for your crypto exchange.
  • Take card or bank transfer deposits for your savings, lending, investing or P2P payments product.
  • Take USDC payments directly through on-chain transfers.

func (*API) CancelPayment

func (mod *API) CancelPayment(
	id string,
	c circlesdk.CapturePaymentRequest,
	opts ...circlesdk.CallOption) (*circlesdk.Payment, error)

CancelPayment the payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be canceled. A successful response does not mean the payment has been canceled; it only means the cancellation request is successfully submitted. https://developers.circle.com/reference/payments-payments-cancel-id

func (*API) CapturePayment

func (mod *API) CapturePayment(
	id string,
	c circlesdk.CapturePaymentRequest,
	opts ...circlesdk.CallOption) error

CapturePayment the given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount will be captured. You can only capture once per authorization. A successful response does not mean the payment has been captured. It only means the capture request was successfully submitted. https://developers.circle.com/reference/capturepayment

func (*API) CreateBankAccount

func (mod *API) CreateBankAccount(
	b circlesdk.CreateBankAccountRequest,
	opts ...circlesdk.CallOption) (*circlesdk.BankAccount, error)

CreateBankAccount creates a bank account for future usage, i.e. creating payments. https://developers.circle.com/reference/payments-bank-accounts-ach-create

func (*API) CreateCard

func (mod *API) CreateCard(c circlesdk.CreateCardRequest, opts ...circlesdk.CallOption) (*circlesdk.Card, error)

CreateCard creates a card for future usage, i.e. creating payments. https://developers.circle.com/reference/payments-cards-create

func (*API) CreatePayment

func (mod *API) CreatePayment(
	c circlesdk.CreatePaymentRequest,
	opts ...circlesdk.CallOption) (*circlesdk.Payment, error)

CreatePayment creates a new payment. https://developers.circle.com/reference/payments-payments-create

func (*API) GetBankAccount

func (mod *API) GetBankAccount(id string, opts ...circlesdk.CallOption) (*circlesdk.BankAccount, error)

GetBankAccount returns the details of the specified bank account. https://developers.circle.com/reference/payments-bank-accounts-ach-get-id

func (*API) GetCard

func (mod *API) GetCard(id string, opts ...circlesdk.CallOption) (*circlesdk.Card, error)

GetCard returns details of the specified card. https://developers.circle.com/reference/payments-cards-get-id

func (*API) GetChargeback

func (mod *API) GetChargeback(id string, opts ...circlesdk.CallOption) (*circlesdk.ChargeBack, error)

GetChargeback returns the details of the specified chargeback. https://developers.circle.com/reference/payments-chargebacks-get-id

func (*API) GetPayment

func (mod *API) GetPayment(id string, opts ...circlesdk.CallOption) (*circlesdk.Payment, error)

GetPayment returns the details of the specified payment. https://developers.circle.com/reference/payments-payments-get-id

func (*API) GetSettlement

func (mod *API) GetSettlement(id string, opts ...circlesdk.CallOption) (*circlesdk.Settlement, error)

GetSettlement returns the details of the specified settlement. https://developers.circle.com/reference/payments-settlements-get-id

func (*API) ListCards

func (mod *API) ListCards(opts ...circlesdk.CallOption) ([]*circlesdk.Card, error)

ListCards returns a list of cards based on the passed options. https://developers.circle.com/reference/payments-cards-get

func (*API) ListChargebacks

func (mod *API) ListChargebacks(paymentID string, opts ...circlesdk.CallOption) ([]*circlesdk.ChargeBack, error)

ListChargebacks returns a list of chargebacks based on the passed options. https://developers.circle.com/reference/payments-chargebacks-get

func (*API) ListPayments

func (mod *API) ListPayments(
	l circlesdk.ListPaymentsRequest,
	opts ...circlesdk.CallOption) ([]*circlesdk.Payment, error)

ListPayments returns a list of payments based on the passed request and options. https://developers.circle.com/reference/payments-payments-get

func (*API) ListReversals

func (mod *API) ListReversals(status string, opts ...circlesdk.CallOption) ([]*circlesdk.Reversal, error)

ListReversals returns a list of reversals based on the passed options. https://developers.circle.com/reference/payments-reversals-get

func (*API) ListSettlements

func (mod *API) ListSettlements(opts ...circlesdk.CallOption) ([]*circlesdk.Settlement, error)

ListSettlements returns a list of settlements based on the passed options. https://developers.circle.com/reference/payments-settlements-get

func (*API) RefundPayment

func (mod *API) RefundPayment(
	id string, r circlesdk.RefundPaymentRequest,
	opts ...circlesdk.CallOption) (*circlesdk.Payment, error)

RefundPayment the payment source will be refunded if possible. Not all payments are eligible to be canceled. A successful response does not mean the payment has been refunded; it only means the refund request is successfully submitted. https://developers.circle.com/reference/payments-payments-refund-id

func (*API) UpdateCard

func (mod *API) UpdateCard(
	id string,
	c circlesdk.UpdateCardRequest,
	opts ...circlesdk.CallOption) (*circlesdk.Card, error)

UpdateCard updates the details of the specified card. https://developers.circle.com/reference/payments-cards-update-id

Jump to

Keyboard shortcuts

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