Documentation
¶
Index ¶
- Constants
- type APIError
- type AccountChange
- type AccountLogin
- type AccountOpening
- type BNPL
- type CallbackService
- type CallbackTransactionRequest
- type CallbackTransactionResponse
- type Card
- type Client
- type Common
- type Crypto
- type Deposit
- type ErrorResponse
- type Invoice
- type Loan
- type Option
- type P2P
- type ProcessRequest
- type ProcessResponse
- type ProcessService
- type Refund
- type Transaction
- type Transfer
- type ValidationError
- type Withdrawal
Constants ¶
const ( TransactionTypeCard = "card" TransactionTypeTransfer = "transfer" TransactionTypeRemittance = "remittance" TransactionTypeAccountOpening = "account_opening" TransactionTypeAccountLogin = "account_login" TransactionTypeAccountChange = "account_change" TransactionTypeRefund = "refund" TransactionTypeWithdrawal = "withdrawal" TransactionTypeDeposit = "deposit" TransactionTypeP2P = "p2p" TransactionTypeCrypto = "crypto" TransactionTypeBNPL = "bnpl" TransactionTypeLoan = "loan" TransactionTypeInvoice = "invoice" )
Transaction type constants.
const ( TransferTypeWalletToWallet = "wallet_to_wallet" TransferTypeWalletToIBAN = "wallet_to_iban" TransferTypeIBANToWallet = "iban_to_wallet" TransferTypeRemittance = "remittance" )
Transfer subtype constants for Transfer.TransferType.
const ( CustomerAccountTypeIndividual = "individual" CustomerAccountTypeOrganization = "organization" )
Customer account type constants.
const (
WithdrawalMethodMoneyTransferCollection = "money_transfer_collection"
)
Withdrawal method constants for Withdrawal.WithdrawalMethod.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountChange ¶ added in v1.0.1
type AccountChange struct {
ChangeType string `json:"change_type,omitempty"`
PreviousValueHash string `json:"previous_value_hash,omitempty"`
TimeSinceLastChange string `json:"time_since_last_change,omitempty"`
VerificationMethod string `json:"verification_method,omitempty"`
}
AccountChange holds account modification event data.
type AccountLogin ¶ added in v1.0.1
type AccountLogin struct {
FailedAttempts string `json:"failed_attempts,omitempty"`
LoginMethod string `json:"login_method,omitempty"`
LoginStatus string `json:"login_status,omitempty"`
MFAMethod string `json:"mfa_method,omitempty"`
MFAUsed string `json:"mfa_used,omitempty"`
SessionID string `json:"session_id,omitempty"`
}
AccountLogin holds login event data.
type AccountOpening ¶ added in v1.0.1
type AccountOpening struct {
DocumentType string `json:"document_type,omitempty"`
IdentityVerificationStatus string `json:"identity_verification_status,omitempty"`
RegistrationMethod string `json:"registration_method,omitempty"`
}
AccountOpening holds account registration data.
type BNPL ¶ added in v1.0.1
type BNPL struct {
BNPLProvider string `json:"bnpl_provider,omitempty"`
InstallmentCount string `json:"installment_count,omitempty"`
OutstandingBNPLAmount string `json:"outstanding_bnpl_amount,omitempty"`
}
BNPL holds buy-now-pay-later transaction data.
type CallbackService ¶ added in v1.0.3
type CallbackService struct {
// contains filtered or unexported fields
}
CallbackService handles callback operations.
func (*CallbackService) Transaction ¶ added in v1.0.3
func (s *CallbackService) Transaction(ctx context.Context, req *CallbackTransactionRequest) (*CallbackTransactionResponse, error)
Transaction sends a callback transaction request.
type CallbackTransactionRequest ¶ added in v1.0.3
type CallbackTransactionRequest struct {
Message string `json:"message"`
PaymentID string `json:"payment_id"`
Status string `json:"status"`
}
CallbackTransactionRequest represents a callback transaction request.
type CallbackTransactionResponse ¶ added in v1.0.3
type CallbackTransactionResponse struct {
Message string `json:"message"`
}
CallbackTransactionResponse represents the result of a callback transaction.
type Card ¶ added in v1.0.1
type Card struct {
BinNumber string `json:"bin_number,omitempty"`
Holder string `json:"holder,omitempty"`
Issuer string `json:"issuer,omitempty"`
LastFour string `json:"last_four,omitempty"`
MCC string `json:"mcc,omitempty"`
Network string `json:"network,omitempty"`
Token string `json:"token,omitempty"`
Type string `json:"type,omitempty"`
}
Card holds payment card details.
type Client ¶
type Client struct {
Callback *CallbackService
Process *ProcessService
// contains filtered or unexported fields
}
Client is the Aurora API client.
type Common ¶ added in v1.0.1
type Common struct {
Amount float64 `json:"amount,omitempty"`
Balance float64 `json:"balance,omitempty"`
BrowserAgent string `json:"browser_agent,omitempty"`
Category string `json:"category,omitempty"`
ConnectionType string `json:"connection_type,omitempty"`
Country string `json:"country,omitempty"`
Currency string `json:"currency,omitempty"`
Date string `json:"date,omitempty"`
Description string `json:"description,omitempty"`
DeviceFingerprint string `json:"device_fingerprint,omitempty"`
DeviceID string `json:"device_id,omitempty"`
FirstName string `json:"first_name,omitempty" example:"John"`
LastName string `json:"last_name,omitempty" example:"Doe"`
IdentityNumber string `json:"identity_number,omitempty" example:"123456789"`
Email string `json:"email,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
LastLoginIP string `json:"last_login_ip,omitempty"`
LastLoginTime string `json:"last_login_time,omitempty"`
Latitude string `json:"latitude,omitempty"`
LocationCity string `json:"location_city,omitempty"`
LocationCountry string `json:"location_country,omitempty"`
LocationRegion string `json:"location_region,omitempty"`
LocationRegionCode string `json:"location_region_code,omitempty"`
LocationSource string `json:"location_source,omitempty"`
Longitude string `json:"longitude,omitempty"`
MerchantID string `json:"merchant_id,omitempty"`
MerchantName string `json:"merchant_name,omitempty"`
PaymentID string `json:"payment_id,omitempty"`
Phone string `json:"phone,omitempty"`
ReferenceID string `json:"reference_id,omitempty"`
UserID string `json:"user_id,omitempty"`
}
Common holds core transaction and user identification fields.
type Crypto ¶ added in v1.0.1
type Crypto struct {
CryptoAmount string `json:"crypto_amount,omitempty"`
CryptoCurrency string `json:"crypto_currency,omitempty"`
ExchangeName string `json:"exchange_name,omitempty"`
IsSmartContract string `json:"is_smart_contract,omitempty"`
WalletAddress string `json:"wallet_address,omitempty"`
}
Crypto holds cryptocurrency transaction data.
type Deposit ¶ added in v1.0.1
type Deposit struct {
CheckNumber string `json:"check_number,omitempty"`
DepositMethod string `json:"deposit_method,omitempty"`
DepositSource string `json:"deposit_source,omitempty"`
IsRemoteDeposit string `json:"is_remote_deposit,omitempty"`
}
Deposit holds deposit transaction data.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an API error.
type Invoice ¶ added in v1.0.1
type Invoice struct {
InvoiceDueDate string `json:"invoice_due_date,omitempty"`
InvoiceNumber string `json:"invoice_number,omitempty"`
IsRecurringVendor string `json:"is_recurring_vendor,omitempty"`
PurchaseOrderID string `json:"purchase_order_id,omitempty"`
VendorID string `json:"vendor_id,omitempty"`
VendorName string `json:"vendor_name,omitempty"`
}
Invoice holds invoice and vendor payment data.
type Loan ¶ added in v1.0.1
type Loan struct {
CreditScore string `json:"credit_score,omitempty"`
DebtToIncomeRatio string `json:"debt_to_income_ratio,omitempty"`
EmploymentStatus string `json:"employment_status,omitempty"`
LoanAmount string `json:"loan_amount,omitempty"`
LoanTerm string `json:"loan_term,omitempty"`
LoanType string `json:"loan_type,omitempty"`
}
Loan holds loan application data.
type Option ¶
type Option func(*Client)
Option is a functional option for configuring the Client.
func WithBaseURL ¶
WithBaseURL sets the host URL (e.g. "https://api.example.com"). The API path (/api/v1) is appended automatically.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithTimeout ¶
WithTimeout sets the HTTP client timeout.
type P2P ¶ added in v1.0.1
type P2P struct {
PaymentNote string `json:"payment_note,omitempty"`
Platform string `json:"platform,omitempty"`
RecipientAccountAge string `json:"recipient_account_age,omitempty"`
}
P2P holds peer-to-peer payment data.
type ProcessRequest ¶
type ProcessRequest struct {
RuleID string `json:"rule_id,omitempty"`
RulesetID string `json:"ruleset_id,omitempty"`
TransactionID string `json:"transaction_id,omitempty"`
// LifecycleRootTransactionID links a remittance collection to the remittance
// send that opened its lifecycle; only valid on a remittance collection request.
LifecycleRootTransactionID string `json:"lifecycle_root_transaction_id,omitempty"`
Transaction *Transaction `json:"transaction,omitempty"`
}
ProcessRequest represents a rule processing request.
type ProcessResponse ¶
type ProcessResponse struct {
TransactionID string `json:"transaction_id,omitempty"`
Allow bool `json:"allow"`
AllowMessage string `json:"allow_message,omitempty"`
Error bool `json:"error"`
ErrorMessage string `json:"error_message,omitempty"`
ExecutionTime time.Duration `json:"execution_time"`
InspectMessage string `json:"inspect_message,omitempty"`
NeedInspect bool `json:"need_inspect"`
RejectMessage string `json:"reject_message,omitempty"`
Rejected bool `json:"rejected"`
Score int `json:"score"`
}
ProcessResponse represents the result of rule processing.
type ProcessService ¶
type ProcessService struct {
// contains filtered or unexported fields
}
ProcessService handles rule processing operations.
func (*ProcessService) Execute ¶
func (s *ProcessService) Execute(ctx context.Context, req *ProcessRequest) (*ProcessResponse, error)
Execute processes a transaction against a rule or ruleset and returns the result.
type Refund ¶ added in v1.0.1
type Refund struct {
DaysSincePurchase string `json:"days_since_purchase,omitempty"`
OriginalTransactionID string `json:"original_transaction_id,omitempty"`
RefundMethod string `json:"refund_method,omitempty"`
RefundReason string `json:"refund_reason,omitempty"`
}
Refund holds refund transaction data.
type Transaction ¶
type Transaction struct {
// Nested sub-objects
AccountChange *AccountChange `json:"account_change,omitempty"`
AccountLogin *AccountLogin `json:"account_login,omitempty"`
AccountOpening *AccountOpening `json:"account_opening,omitempty"`
BNPL *BNPL `json:"bnpl,omitempty"`
Card *Card `json:"card,omitempty"`
Common *Common `json:"common,omitempty"`
Crypto *Crypto `json:"crypto,omitempty"`
Deposit *Deposit `json:"deposit,omitempty"`
Invoice *Invoice `json:"invoice,omitempty"`
Loan *Loan `json:"loan,omitempty"`
P2P *P2P `json:"p2p,omitempty"`
Refund *Refund `json:"refund,omitempty"`
Transfer *Transfer `json:"transfer,omitempty"`
Withdrawal *Withdrawal `json:"withdrawal,omitempty"`
// Top-level scalar fields
AccountAgeDays string `json:"account_age_days,omitempty"`
CustomerAccountType string `json:"customer_account_type,omitempty"`
CustomerAgeYears string `json:"customer_age_years,omitempty"`
DeclinedCount string `json:"declined_count,omitempty"`
FirstTransactionAgeDays string `json:"first_transaction_age_days,omitempty"`
IncomeMultiplier string `json:"income_multiplier,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IsFirstTransfer string `json:"is_first_transfer,omitempty"`
IsNewDevice string `json:"is_new_device,omitempty"`
IsNewIP string `json:"is_new_ip,omitempty"`
IsUnusualLocation string `json:"is_unusual_location,omitempty"`
PasswordChangedRecently string `json:"password_changed_recently,omitempty"`
ProfileCompletion string `json:"profile_completion,omitempty"`
RefundCount string `json:"refund_count,omitempty"`
RefundRatio string `json:"refund_ratio,omitempty"`
RegisteredIncome string `json:"registered_income,omitempty"`
TotalAmount24h string `json:"total_amount_24h,omitempty"`
TotalAmount7d string `json:"total_amount_7d,omitempty"`
TransactionHour string `json:"transaction_hour,omitempty"`
TransactionType string `json:"transaction_type,omitempty"`
TransferCount24h string `json:"transfer_count_24h,omitempty"`
Type string `json:"type"`
UniqueRecipients string `json:"unique_recipients,omitempty"`
}
Transaction contains all the data fields that can be evaluated by rules.
type Transfer ¶ added in v1.0.1
type Transfer struct {
ExchangeRate string `json:"exchange_rate,omitempty"`
PaymentMethod string `json:"payment_method,omitempty"`
ReceiverAddress string `json:"receiver_address,omitempty"`
ReceiverCountry string `json:"receiver_country,omitempty"`
ReceiverIBAN string `json:"receiver_iban,omitempty"`
ReceiverIdentityPassport string `json:"receiver_identity_passport,omitempty"`
ReceiverName string `json:"receiver_name,omitempty"`
ReceiverSurname string `json:"receiver_surname,omitempty"`
ReceiverWalletID string `json:"receiver_wallet_id,omitempty"`
ReceiverIdentityNumber string `json:"receiver_identity_number,omitempty" example:"987654321"`
ReceiverPhone string `json:"receiver_phone,omitempty" example:"+0987654321"`
ReceiverEmail string `json:"receiver_email,omitempty" example:"john@doe.com"`
Relationship string `json:"relationship,omitempty"`
SenderAddress string `json:"sender_address,omitempty"`
SenderCountry string `json:"sender_country,omitempty"`
SenderIBAN string `json:"sender_iban,omitempty"`
SenderIdentityPassport string `json:"sender_identity_passport,omitempty"`
SenderName string `json:"sender_name,omitempty"`
SenderSurname string `json:"sender_surname,omitempty"`
SenderWalletID string `json:"sender_wallet_id,omitempty"`
SenderIdentityNumber string `json:"sender_identity_number,omitempty" example:"123456789"`
SenderPhone string `json:"sender_phone,omitempty" example:"+1234567890"`
SenderEmail string `json:"sender_email,omitempty" example:"john@doe.com"`
SourceOfFunds string `json:"source_of_funds,omitempty"`
TargetCurrency string `json:"target_currency,omitempty"`
TransferPurpose string `json:"transfer_purpose,omitempty"`
TransferType string `json:"transfer_type,omitempty"`
}
Transfer holds international money transfer fields.
type ValidationError ¶ added in v1.0.1
ValidationError represents a client-side validation error.
func (*ValidationError) Error ¶ added in v1.0.1
func (e *ValidationError) Error() string
type Withdrawal ¶ added in v1.0.1
type Withdrawal struct {
AccountType string `json:"account_type,omitempty"`
ATMID string `json:"atm_id,omitempty"`
DailyWithdrawalCount string `json:"daily_withdrawal_count,omitempty"`
WithdrawalMethod string `json:"withdrawal_method,omitempty"`
}
Withdrawal holds withdrawal transaction data.