Versions in this module Expand all Collapse all v1 v1.0.0 Jul 22, 2026 Changes in this version + const Alipay + const ApplicationTypeEnrolment + const ApplicationTypeMaintenance + const ApplicationTypeTermination + const BoostPayFlex + const BoostWallet + const CreditCard + const DirectDebitStatusActive + const DirectDebitStatusApproved + const DirectDebitStatusCancelled + const DirectDebitStatusError + const DirectDebitStatusFailedBankVerification + const DirectDebitStatusNew + const DirectDebitStatusRejected + const DirectDebitStatusTerminated + const DirectDebitStatusWaitingApproval + const DobwCASA + const DobwCreditCard + const DobwEWallet + const DobwStatusCancelled + const DobwStatusFailed + const DobwStatusNew + const DobwStatusPending + const DobwStatusSuccess + const DuitNowDOBW + const DuitNowQR + const FPX + const FpxDirectDebit + const FpxLineOfCredit + const FpxStatusCancelled + const FpxStatusFailed + const FpxStatusNew + const FpxStatusPending + const FpxStatusSuccess + const FrequencyModeDaily + const FrequencyModeMonthly + const FrequencyModeWeekly + const FrequencyModeYearly + const GrabPL + const GrabPay + const ManualTransfer + const NETS + const PayerIDTypeBusinessRegistration + const PayerIDTypeNRIC + const PayerIDTypeOldIC + const PayerIDTypeOthers + const PayerIDTypePassport + const PromptPay + const QRISOB + const QRISWallet + const SPayLater + const ShopeePay + const TouchNGo + const WeChatPay + func DirectDebitApplicationTypeText(applicationType string) string + func DirectDebitFrequencyModeText(frequencyMode string) string + func DirectDebitStatusText(code int) string + func DobwStatusText(code int) string + func FpxStatusText(code int) string + type APIError struct + Body string + StatusCode int + func (e *APIError) Error() string + type CallbackData map[string]string + type Client struct + func New(token string, opts ...Option) *Client + func (c *Client) CancelPaymentIntent(ctx context.Context, paymentIntentID string) (*PaymentIntent, error) + func (c *Client) CreateChecksumValue(secretKey string, payload map[string]string) string + func (c *Client) CreateFpxDirectDebitEnrollment(ctx context.Context, req DirectDebitEnrolmentRequest) (*FpxDirectDebitApplication, error) + func (c *Client) CreateFpxDirectDebitEnrolmentChecksumValue(secretKey string, req DirectDebitEnrolmentRequest) string + func (c *Client) CreateFpxDirectDebitMaintenance(ctx context.Context, mandateID string, req DirectDebitMaintenanceRequest) (*FpxDirectDebitApplication, error) + func (c *Client) CreateFpxDirectDebitMaintenanceChecksumValue(secretKey string, req DirectDebitMaintenanceRequest) string + func (c *Client) CreateFpxDirectDebitTermination(ctx context.Context, mandateID string, req DirectDebitTerminationRequest) (*FpxDirectDebitApplication, error) + func (c *Client) CreateManualBankTransfer(ctx context.Context, req ManualBankTransferRequest, allowRedirect bool) (*ManualBankTransferResult, error) + func (c *Client) CreatePaymentIntenChecksumValue(secretKey string, req PaymentIntentRequest) string + func (c *Client) CreatePaymentIntent(ctx context.Context, req PaymentIntentRequest) (*PaymentIntent, error) + func (c *Client) CreatePaymentIntentChecksumValue(secretKey string, req PaymentIntentRequest) string + func (c *Client) FpxBanksList(ctx context.Context) ([]FpxBank, error) + func (c *Client) GetAPIVersion() string + func (c *Client) GetAllTransactions(ctx context.Context, filters TransactionFilters) (*TransactionList, error) + func (c *Client) GetChannels(ctx context.Context, portalKey string) ([]map[string]any, error) + func (c *Client) GetFpxDirectDebit(ctx context.Context, id string) (*FpxDirectDebitMandate, error) + func (c *Client) GetFpxDirectDebitTransaction(ctx context.Context, id string) (*Transaction, error) + func (c *Client) GetFpxDirectDebitransaction(ctx context.Context, id string) (*Transaction, error) + func (c *Client) GetPaymentIntent(ctx context.Context, paymentIntentID string) (*PaymentIntent, error) + func (c *Client) GetPortals(ctx context.Context) ([]Portal, error) + func (c *Client) GetTimeout() time.Duration + func (c *Client) GetTransaction(ctx context.Context, id string) (*Transaction, error) + func (c *Client) GetTransactionByOrderNumber(ctx context.Context, orderNumber string) ([]Transaction, error) + func (c *Client) GetTransactionByReferenceNumber(ctx context.Context, referenceNumber string) (*Transaction, error) + func (c *Client) GetTransactionsByPayerEmail(ctx context.Context, email string) ([]Transaction, error) + func (c *Client) GetTransactionsByPaymentChannel(ctx context.Context, channel int) ([]Transaction, error) + func (c *Client) GetTransactionsByStatus(ctx context.Context, status string) ([]Transaction, error) + func (c *Client) ParseManualBankTransferResponse(htmlResponse string) map[string]string + func (c *Client) Retry(ctx context.Context, timeout time.Duration, fn func() (any, error), ...) (any, error) + func (c *Client) SetAPIVersion(version string) *Client + func (c *Client) SetSecretKey(secretKey string) *Client + func (c *Client) SetTimeout(d time.Duration) *Client + func (c *Client) SetToken(token string) *Client + func (c *Client) UpdateManualBankTransferStatus(ctx context.Context, refNo, status, amount string) (any, error) + func (c *Client) UseSandbox() *Client + func (c *Client) VerifyDirectDebitAuthorizationCallbackData(callbackData CallbackData, secretKey string) bool + func (c *Client) VerifyDirectDebitBankApprovalCallbackData(callbackData CallbackData, secretKey string) bool + func (c *Client) VerifyDirectDebitTransactionCallbackData(callbackData CallbackData, secretKey string) bool + func (c *Client) VerifyPreTransactionCallbackData(callbackData CallbackData, secretKey string) bool + func (c *Client) VerifyReturnUrlCallbackData(callbackData CallbackData, secretKey string) bool + func (c *Client) VerifyTransactionCallbackData(callbackData CallbackData, secretKey string) bool + type DirectDebitEnrolmentRequest struct + Amount string + ApplicationReason string + Checksum string + EffectiveDate string + ExpiryDate string + Extra map[string]string + FrequencyMode string + OrderNumber string + PayerEmail string + PayerID string + PayerIDType int + PayerName string + PayerTelephoneNumber string + PortalKey string + ReturnURL string + type DirectDebitMaintenanceRequest struct + Amount string + ApplicationReason string + Checksum string + Extra map[string]string + FrequencyMode string + PayerEmail string + PayerTelephoneNumber string + type DirectDebitTerminationRequest struct + ApplicationReason string + Checksum string + Extra map[string]string + type FailedActionError struct + Message string + func (e *FailedActionError) Error() string + type FlexBool bool + func (b *FlexBool) UnmarshalJSON(data []byte) error + func (b FlexBool) Bool() bool + type FlexString string + func (f *FlexString) UnmarshalJSON(data []byte) error + func (f FlexString) Float64() (float64, error) + func (f FlexString) String() string + type FpxBank struct + BankAvailability *FlexBool + BankCode *string + BankCodeHashed *string + BankDisplayName *string + BankName *string + type FpxDirectDebitApplication struct + Amount *FlexString + ApplicationReason *string + ApplicationType *string + EffectiveDate *string + ExpiryDate *string + FrequencyMode *string + OrderNumber *string + PayerEmail *string + PayerID *string + PayerIDType *int + PayerName *string + PayerTelephoneNumber *string + URL *string + type FpxDirectDebitMandate struct + Amount *FlexString + ApplicationReason *string + Currency *string + EffectiveDate *string + ExpiryDate *string + FrequencyMode *string + FrequencyModeLabel *string + ID *FlexString + MandateReferenceNumber *string + Merchant map[string]any + Metadata map[string]any + OrderNumber *string + PayerBankAccountNumber *string + PayerEmail *string + PayerID *string + PayerIDType *int + PayerName *string + PayerTelephoneNumber *string + Portal *string + ReturnURL *string + Status *FlexString + StatusDescription *string + UpdatedAt *string + type ManualBankTransferRequest struct + BankTransferDate string + BankTransferNotes string + BankTransferType string + BuyerEmail string + BuyerName string + BuyerTelNo string + Extra map[string]string + MerchantBankAccount string + MerchantBankAccountHolder string + MerchantBankName string + OrderAmount string + OrderNo string + PaymentGateway int + PortalKey string + ProofOfPayment string + type ManualBankTransferResult struct + FormData map[string]string + HTMLForm string + IsRedirect bool + JSON any + Location string + Raw string + RedirectURL string + ReturnURL string + StatusCode int + Success bool + type NotFoundError struct + func (e *NotFoundError) Error() string + type Option func(*Client) + func WithAPIVersion(version string) Option + func WithBaseURL(baseURL string) Option + func WithHTTPClient(hc *http.Client) Option + func WithSandbox(sandbox bool) Option + func WithSecretKey(secretKey string) Option + func WithTimeout(d time.Duration) Option + type PaymentIntent struct + Amount *FlexString + Attempts []any + Currency *string + ID *FlexString + LastAttempt any + OrderNumber *string + PaidAt *string + PayerEmail *string + PayerName *string + PayerTelephoneNumber *string + Status *FlexString + Type *string + URL *string + type PaymentIntentRequest struct + Amount string + CallbackURL string + Checksum string + Extra map[string]string + Metadata map[string]string + OrderNumber string + PayerEmail string + PayerName string + PayerTelephoneNumber string + PaymentChannel []int + PortalKey string + ReturnURL string + type Portal struct + CreatedAt *string + CustomPaymentButtonText *string + EnabledSmsOnSuccessfulTransaction *int + ID *FlexString + Merchant map[string]any + MerchantID *FlexString + PaymentChannels []map[string]any + PortalKey *string + PortalName *string + SecondaryTransactionNotificationEmail *string + SplitPaymentEnabled *FlexBool + SplitPaymentMerchants []any + TransactionNotificationEmail *string + URL *string + WebsiteURL *string + type RateLimitError struct + ResetsAt *int64 + func (e *RateLimitError) Error() string + type TimeoutError struct + Output []any + func (e *TimeoutError) Error() string + type Transaction struct + Amount *FlexString + CreatedAt *string + Currency *string + Datetime *string + ExchangeReferenceNumber *string + ExchangeTransactionID *string + ID *FlexString + Mandate map[string]any + Merchant map[string]any + Metadata map[string]any + OrderNumber *string + PayerBankName *string + PayerEmail *string + PayerName *string + PayerTelephoneNumber *string + PaymentGateway map[string]any + Payout map[string]any + Portal *string + ReturnURL *string + Status *FlexString + StatusDescription *string + UpdatedAt *string + type TransactionFilters struct + ExchangeReferenceNumber string + OrderNumber string + PayerEmail string + PaymentChannel int + Status string + type TransactionList struct + Data []Transaction + Meta map[string]any + type ValidationError struct + Errors map[string]any + func (e *ValidationError) Error() string