Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func String(s string) *string
- type Authentication
- type EligibilityAPIs
- func (s *EligibilityAPIs) EligibilityCardlessEMI(ctx context.Context, request operations.EligibilityCardlessEMIRequest) (*operations.EligibilityCardlessEMIResponse, error)
- func (s *EligibilityAPIs) EligibilityOffer(ctx context.Context, request operations.EligibilityOfferRequest) (*operations.EligibilityOfferResponse, error)
- func (s *EligibilityAPIs) EligibilityPaylater(ctx context.Context, request operations.EligibilityPaylaterRequest) (*operations.EligibilityPaylaterResponse, error)
- type HTTPClient
- type Offers
- type Orders
- func (s *Orders) CreateOrder(ctx context.Context, request operations.CreateOrderRequest) (*operations.CreateOrderResponse, error)
- func (s *Orders) GetOrder(ctx context.Context, request operations.GetOrderRequest) (*operations.GetOrderResponse, error)
- func (s *Orders) OrderPay(ctx context.Context, request operations.OrderPayRequest) (*operations.OrderPayResponse, error)
- func (s *Orders) Preauthorization(ctx context.Context, request operations.PreauthorizationRequest) (*operations.PreauthorizationResponse, error)
- type PGLatest
- type PaymentLinks
- func (s *PaymentLinks) CancelPaymentLink(ctx context.Context, request operations.CancelPaymentLinkRequest) (*operations.CancelPaymentLinkResponse, error)
- func (s *PaymentLinks) CreatePaymentLink(ctx context.Context, request operations.CreatePaymentLinkRequest) (*operations.CreatePaymentLinkResponse, error)
- func (s *PaymentLinks) GetPaymentLinkDetails(ctx context.Context, request operations.GetPaymentLinkDetailsRequest) (*operations.GetPaymentLinkDetailsResponse, error)
- func (s *PaymentLinks) GetPaymentLinkOrders(ctx context.Context, request operations.GetPaymentLinkOrdersRequest) (*operations.GetPaymentLinkOrdersResponse, error)
- type Payments
- type Reconciliation
- type Refunds
- func (s *Refunds) Createrefund(ctx context.Context, request operations.CreaterefundRequest) (*operations.CreaterefundResponse, error)
- func (s *Refunds) GetRefund(ctx context.Context, request operations.GetRefundRequest) (*operations.GetRefundResponse, error)
- func (s *Refunds) Getallrefundsfororder(ctx context.Context, request operations.GetallrefundsfororderRequest) (*operations.GetallrefundsfororderResponse, error)
- type SDKOption
- type Settlements
- type SoftPOS
- func (s *SoftPOS) CreateTerminals(ctx context.Context, request operations.CreateTerminalsRequest) (*operations.CreateTerminalsResponse, error)
- func (s *SoftPOS) GetTerminalByMobileNumber(ctx context.Context, request operations.GetTerminalByMobileNumberRequest) (*operations.GetTerminalByMobileNumberResponse, error)
- type TokenVault
- func (s *TokenVault) DeleteSpecificSavedInstrument(ctx context.Context, request operations.DeleteSpecificSavedInstrumentRequest) (*operations.DeleteSpecificSavedInstrumentResponse, error)
- func (s *TokenVault) FetchAllSavedInstruments(ctx context.Context, request operations.FetchAllSavedInstrumentsRequest) (*operations.FetchAllSavedInstrumentsResponse, error)
- func (s *TokenVault) FetchCryptogram(ctx context.Context, request operations.FetchCryptogramRequest) (*operations.FetchCryptogramResponse, error)
- func (s *TokenVault) FetchSpecificSavedInstrument(ctx context.Context, request operations.FetchSpecificSavedInstrumentRequest) (*operations.FetchSpecificSavedInstrumentResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://sandbox.cashfree.com/pg",
"https://api.cashfree.com/pg",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
The Authentication API allows merchants to show a native screen and capture OTP on their own page and submit to Cashfree. This feature is only available on request.
func (*Authentication) OTPRequest ¶
func (s *Authentication) OTPRequest(ctx context.Context, request operations.OTPRequestRequest) (*operations.OTPRequestResponse, error)
OTPRequest - Submit or Resend OTP If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
type EligibilityAPIs ¶
type EligibilityAPIs struct {
// contains filtered or unexported fields
}
func (*EligibilityAPIs) EligibilityCardlessEMI ¶
func (s *EligibilityAPIs) EligibilityCardlessEMI(ctx context.Context, request operations.EligibilityCardlessEMIRequest) (*operations.EligibilityCardlessEMIResponse, error)
EligibilityCardlessEMI - Get eligible Cardless EMI Use this API to get eligible Cardless EMI Payment Methods for a customer on an order.
func (*EligibilityAPIs) EligibilityOffer ¶
func (s *EligibilityAPIs) EligibilityOffer(ctx context.Context, request operations.EligibilityOfferRequest) (*operations.EligibilityOfferResponse, error)
EligibilityOffer - Get eligible Offers Use this API to get eligible offers for an order or amount.
func (*EligibilityAPIs) EligibilityPaylater ¶
func (s *EligibilityAPIs) EligibilityPaylater(ctx context.Context, request operations.EligibilityPaylaterRequest) (*operations.EligibilityPaylaterResponse, error)
EligibilityPaylater - Get eligible Paylater Use this API to get eligible Paylater Payment Methods for a customer on an order.
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type Offers ¶
type Offers struct {
// contains filtered or unexported fields
}
func (*Offers) CreateOffer ¶
func (s *Offers) CreateOffer(ctx context.Context, request operations.CreateOfferRequest) (*operations.CreateOfferResponse, error)
CreateOffer - Create Offer Use this API to create offers with Cashfree from your backend
func (*Offers) GetOffer ¶
func (s *Offers) GetOffer(ctx context.Context, request operations.GetOfferRequest) (*operations.GetOfferResponse, error)
GetOffer - Get Offer by ID Use this API to get offer by offer_id
type Orders ¶
type Orders struct {
// contains filtered or unexported fields
}
func (*Orders) CreateOrder ¶
func (s *Orders) CreateOrder(ctx context.Context, request operations.CreateOrderRequest) (*operations.CreateOrderResponse, error)
CreateOrder - Create Order Use this API to create orders with Cashfree from your backend and get the payment link. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information email us at "care@cashfree.com".
func (*Orders) GetOrder ¶
func (s *Orders) GetOrder(ctx context.Context, request operations.GetOrderRequest) (*operations.GetOrderResponse, error)
GetOrder - Get Order Use this API to view all details of an order.
func (*Orders) OrderPay ¶
func (s *Orders) OrderPay(ctx context.Context, request operations.OrderPayRequest) (*operations.OrderPayResponse, error)
OrderPay - Order Pay Use this API when you have already created the orders and want Cashfree to process the payment. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information send an email to "care@cashfree.com".
func (*Orders) Preauthorization ¶
func (s *Orders) Preauthorization(ctx context.Context, request operations.PreauthorizationRequest) (*operations.PreauthorizationResponse, error)
Preauthorization Use this API to capture or void a preauthorized payment
type PGLatest ¶
type PGLatest struct { // Cashfree's token Vault helps you save cards and tokenize them in a PCI complaint manner. We support creation of network tokens which can be used across acquiring banks TokenVault *TokenVault EligibilityAPIs *EligibilityAPIs PaymentLinks *PaymentLinks Offers *Offers Orders *Orders // The Authentication API allows merchants to show a native screen and capture OTP on their own page and submit to Cashfree. This feature is only available on request. Authentication *Authentication Payments *Payments Refunds *Refunds Settlements *Settlements Reconciliation *Reconciliation // softPOS' agent and order management system now supported by APIs SoftPOS *SoftPOS // contains filtered or unexported fields }
type PaymentLinks ¶
type PaymentLinks struct {
// contains filtered or unexported fields
}
func (*PaymentLinks) CancelPaymentLink ¶
func (s *PaymentLinks) CancelPaymentLink(ctx context.Context, request operations.CancelPaymentLinkRequest) (*operations.CancelPaymentLinkResponse, error)
CancelPaymentLink - Cancel Payment Link Use this API to cancel a payment link. No further payments can be done against a cancelled link. Only a link in ACTIVE status can be cancelled.
func (*PaymentLinks) CreatePaymentLink ¶
func (s *PaymentLinks) CreatePaymentLink(ctx context.Context, request operations.CreatePaymentLinkRequest) (*operations.CreatePaymentLinkResponse, error)
CreatePaymentLink - Create Payment Link Use this API to create a new payment link. The created payment link url will be available in the API response parameter link_url.
func (*PaymentLinks) GetPaymentLinkDetails ¶
func (s *PaymentLinks) GetPaymentLinkDetails(ctx context.Context, request operations.GetPaymentLinkDetailsRequest) (*operations.GetPaymentLinkDetailsResponse, error)
GetPaymentLinkDetails - Fetch Payment Link Details Use this API to view all details and status of a payment link.
func (*PaymentLinks) GetPaymentLinkOrders ¶
func (s *PaymentLinks) GetPaymentLinkOrders(ctx context.Context, request operations.GetPaymentLinkOrdersRequest) (*operations.GetPaymentLinkOrdersResponse, error)
GetPaymentLinkOrders - Get Orders for a Payment Link Use this API to view all order details for a payment link.
type Payments ¶
type Payments struct {
// contains filtered or unexported fields
}
func (*Payments) GetPaymentbyID ¶
func (s *Payments) GetPaymentbyID(ctx context.Context, request operations.GetPaymentbyIDRequest) (*operations.GetPaymentbyIDResponse, error)
GetPaymentbyID - Get Payment by ID Use this API to view payment details of an order for a payment ID.
func (*Payments) GetPaymentsfororder ¶
func (s *Payments) GetPaymentsfororder(ctx context.Context, request operations.GetPaymentsfororderRequest) (*operations.GetPaymentsfororderResponse, error)
GetPaymentsfororder - Get Payments for an Order Use this API to view all payment details for an order.
type Reconciliation ¶
type Reconciliation struct {
// contains filtered or unexported fields
}
func (*Reconciliation) PostRecon ¶
func (s *Reconciliation) PostRecon(ctx context.Context, request operations.PostReconRequest) (*operations.PostReconResponse, error)
PostRecon - PG Reconciliation Use this API to get the payment gateway reconciliation details with date range.
func (*Reconciliation) PostSettlementRecon ¶
func (s *Reconciliation) PostSettlementRecon(ctx context.Context, request operations.PostSettlementReconRequest) (*operations.PostSettlementReconResponse, error)
PostSettlementRecon - Settlement Reconciliation Use this API to get settlement reconciliation details using Settlement ID, settlement UTR or date range.
type Refunds ¶
type Refunds struct {
// contains filtered or unexported fields
}
func (*Refunds) Createrefund ¶
func (s *Refunds) Createrefund(ctx context.Context, request operations.CreaterefundRequest) (*operations.CreaterefundResponse, error)
Createrefund - Create Refund Use this API to initiate refunds.
func (*Refunds) GetRefund ¶
func (s *Refunds) GetRefund(ctx context.Context, request operations.GetRefundRequest) (*operations.GetRefundResponse, error)
GetRefund - Get Refund Use this API to fetch a specific refund processed on your Cashfree Account.
func (*Refunds) Getallrefundsfororder ¶
func (s *Refunds) Getallrefundsfororder(ctx context.Context, request operations.GetallrefundsfororderRequest) (*operations.GetallrefundsfororderResponse, error)
Getallrefundsfororder - Get All Refunds for an Order Use this API to fetch all refunds processed against an order.
type SDKOption ¶
type SDKOption func(*PGLatest)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
type Settlements ¶
type Settlements struct {
// contains filtered or unexported fields
}
func (*Settlements) Getsettlements ¶
func (s *Settlements) Getsettlements(ctx context.Context, request operations.GetsettlementsRequest) (*operations.GetsettlementsResponse, error)
Getsettlements - Get Settlements by Order ID Use this API to view all the settlements of a particular order.
func (*Settlements) PostSettlements ¶
func (s *Settlements) PostSettlements(ctx context.Context, request operations.PostSettlementsRequest) (*operations.PostSettlementsResponse, error)
PostSettlements - Get All Settlements Use this API to get all settlement details by specifying the settlement ID, settlement UTR or date range.
type SoftPOS ¶
type SoftPOS struct {
// contains filtered or unexported fields
}
SoftPOS - softPOS' agent and order management system now supported by APIs
func (*SoftPOS) CreateTerminals ¶
func (s *SoftPOS) CreateTerminals(ctx context.Context, request operations.CreateTerminalsRequest) (*operations.CreateTerminalsResponse, error)
CreateTerminals - Create Terminal Use this API to create new terminals to use softPOS.
func (*SoftPOS) GetTerminalByMobileNumber ¶
func (s *SoftPOS) GetTerminalByMobileNumber(ctx context.Context, request operations.GetTerminalByMobileNumberRequest) (*operations.GetTerminalByMobileNumberResponse, error)
GetTerminalByMobileNumber - Get terminal status using phone number Use this API to view all details of a terminal.
type TokenVault ¶
type TokenVault struct {
// contains filtered or unexported fields
}
TokenVault - Cashfree's token Vault helps you save cards and tokenize them in a PCI complaint manner. We support creation of network tokens which can be used across acquiring banks
func (*TokenVault) DeleteSpecificSavedInstrument ¶
func (s *TokenVault) DeleteSpecificSavedInstrument(ctx context.Context, request operations.DeleteSpecificSavedInstrumentRequest) (*operations.DeleteSpecificSavedInstrumentResponse, error)
DeleteSpecificSavedInstrument - Delete Saved Instrument To delete a saved instrument for a customer id and instrument id
func (*TokenVault) FetchAllSavedInstruments ¶
func (s *TokenVault) FetchAllSavedInstruments(ctx context.Context, request operations.FetchAllSavedInstrumentsRequest) (*operations.FetchAllSavedInstrumentsResponse, error)
FetchAllSavedInstruments - Fetch All Saved Instruments To get all saved instruments for a customer id
func (*TokenVault) FetchCryptogram ¶
func (s *TokenVault) FetchCryptogram(ctx context.Context, request operations.FetchCryptogramRequest) (*operations.FetchCryptogramResponse, error)
FetchCryptogram - Fetch cryptogram for saved instrument To get the card network token, token expiry and cryptogram for a saved instrument using instrument id
func (*TokenVault) FetchSpecificSavedInstrument ¶
func (s *TokenVault) FetchSpecificSavedInstrument(ctx context.Context, request operations.FetchSpecificSavedInstrumentRequest) (*operations.FetchSpecificSavedInstrumentResponse, error)
FetchSpecificSavedInstrument - Fetch Single Saved Instrument To get specific saved instrument for a customer id and instrument id