Documentation ¶
Index ¶
- type ApprovePayoutReq
- type ApprovePayoutResponse
- type BalanceResponse
- type BankAccountDetailErrorResponse
- type BankAccountDetailResponse
- type BankAccountResponse
- type Beneficiaries
- type BeneficiariesResponse
- type BeneficiaryBankResponse
- type BeneficiaryBanksResponse
- type Client
- func (c Client) ApprovePayout(req ApprovePayoutReq) (*ApprovePayoutResponse, *midtrans.Error)
- func (c Client) CreateBeneficiaries(req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)
- func (c Client) CreatePayout(req CreatePayoutReq) (*CreatePayoutResponse, *midtrans.Error)
- func (c Client) GetBalance() (*BalanceResponse, *midtrans.Error)
- func (c Client) GetBeneficiaries() ([]Beneficiaries, *midtrans.Error)
- func (c Client) GetBeneficiaryBanks() (*ListBeneficiaryBankResponse, *midtrans.Error)
- func (c Client) GetFacilitatorBalance(accountId string) (*BalanceResponse, *midtrans.Error)
- func (c Client) GetListBankAccount() ([]BankAccountResponse, *midtrans.Error)
- func (c Client) GetPayoutDetails(referenceNo string) (*PayoutDetailResponse, *midtrans.Error)
- func (c Client) GetTopUpChannels() ([]TopUpAccountResponse, *midtrans.Error)
- func (c Client) GetTransactionHistory(fromDate string, toDate string) ([]TransactionHistoryResponse, *midtrans.Error)
- func (c *Client) New(irisApiKey string, env midtrans.EnvironmentType)
- func (c Client) RejectPayout(req RejectPayoutReq) (*RejectPayoutResponse, *midtrans.Error)
- func (c Client) UpdateBeneficiaries(aliasName string, req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)
- func (c Client) ValidateBankAccount(bankName string, accountNo string) (*BankAccountDetailResponse, *midtrans.Error)
- type CreatePayoutDetailReq
- type CreatePayoutDetailResponse
- type CreatePayoutReq
- type CreatePayoutResponse
- type ListBeneficiaryBankResponse
- type PayoutDetailResponse
- type RejectPayoutReq
- type RejectPayoutResponse
- type ResponseWithMap
- type TopUpAccountResponse
- type TransactionHistoryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovePayoutReq ¶
type ApprovePayoutReq struct { ReferenceNo []string `json:"reference_nos"` OTP string `json:"otp"` }
ApprovePayoutReq : Represent Approve Payout payload Iris
type ApprovePayoutResponse ¶
type ApprovePayoutResponse struct { Status string `json:"status"` ErrorMessage string `json:"error_message"` Errors []string `json:"errors"` }
ApprovePayoutResponse : Represent Approve payout response payload
type BalanceResponse ¶
type BalanceResponse struct {
Balance string `json:"balance"`
}
BalanceResponse : Represent balance detail response payload
type BankAccountDetailErrorResponse ¶
type BankAccountDetailErrorResponse struct { Account []string `json:"account"` Bank []string `json:"bank"` }
BankAccountDetailErrorResponse : Represent Bank account detail error payload
type BankAccountDetailResponse ¶
type BankAccountDetailResponse struct { AccountName string `json:"account_name"` AccountNo string `json:"account_no"` BankName string `json:"bank_name"` ErrorMessage string `json:"error_message"` Errors *BankAccountDetailErrorResponse `json:"errors"` }
BankAccountDetailResponse : Represent Bank account detail payload
type BankAccountResponse ¶
type Beneficiaries ¶
type Beneficiaries struct { Name string `json:"name"` Account string `json:"account"` Bank string `json:"bank"` AliasName string `json:"alias_name"` Email string `json:"email"` }
Beneficiaries : Iris Beneficiaries request (create, update, list) https://iris-docs.midtrans.com/#create-beneficiaries https://iris-docs.midtrans.com/#update-beneficiaries https://iris-docs.midtrans.com/#list-beneficiaries
type BeneficiariesResponse ¶
type BeneficiariesResponse struct { Status string `json:"status"` StatusCode string `json:"status_code"` Errors []string `json:"errors"` }
BeneficiariesResponse : Represent Beneficiaries response payload
type BeneficiaryBankResponse ¶
BeneficiaryBankResponse : Represent Beneficiary bank response payload
type BeneficiaryBanksResponse ¶
type BeneficiaryBanksResponse struct { BeneficiaryBanks []BeneficiaryBankResponse `json:"beneficiary_banks"` StatusCode string `json:"status_code"` }
BeneficiaryBanksResponse : Show list of supported banks in IRIS. https://iris-docs.midtrans.com/#list-banks
type Client ¶
type Client struct { IrisApiKey *string Env midtrans.EnvironmentType HttpClient midtrans.HttpClient Options *midtrans.ConfigOptions }
Client : Iris Client struct
func (Client) ApprovePayout ¶
func (c Client) ApprovePayout(req ApprovePayoutReq) (*ApprovePayoutResponse, *midtrans.Error)
ApprovePayout : this method for Apporver to approve multiple payout request. https://iris-docs.midtrans.com/#approve-payouts
func (Client) CreateBeneficiaries ¶
func (c Client) CreateBeneficiaries(req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)
CreateBeneficiaries : to perform create a new beneficiary information for quick access on the payout page in Iris Portal. https://iris-docs.midtrans.com/#create-beneficiaries
func (Client) CreatePayout ¶
func (c Client) CreatePayout(req CreatePayoutReq) (*CreatePayoutResponse, *midtrans.Error)
CreatePayout : This method for Creator to create a payout. It can be used for single payout and also multiple payouts. https://iris-docs.midtrans.com/#create-payouts
func (Client) GetBalance ¶
func (c Client) GetBalance() (*BalanceResponse, *midtrans.Error)
GetBalance : For Aggregator Partner, you need to top up to Iris’ bank account. Every partner have their own balance in Iris’ bank account. Use this API is to get current balance information. https://iris-docs.midtrans.com/#check-balance-aggregator
func (Client) GetBeneficiaries ¶
func (c Client) GetBeneficiaries() ([]Beneficiaries, *midtrans.Error)
GetBeneficiaries : This method to fetch list of all beneficiaries saved in Iris Portal. https://iris-docs.midtrans.com/#list-beneficiaries
func (Client) GetBeneficiaryBanks ¶
func (c Client) GetBeneficiaryBanks() (*ListBeneficiaryBankResponse, *midtrans.Error)
GetBeneficiaryBanks : Show list of supported banks in IRIS. https://iris-docs.midtrans.com/#list-banks
func (Client) GetFacilitatorBalance ¶
func (c Client) GetFacilitatorBalance(accountId string) (*BalanceResponse, *midtrans.Error)
GetFacilitatorBalance : For Facilitator Partner, use this API is to get current balance information of your registered bank account. https://iris-docs.midtrans.com/#bank-accounts-facilitator
func (Client) GetListBankAccount ¶
func (c Client) GetListBankAccount() ([]BankAccountResponse, *midtrans.Error)
GetListBankAccount : Show list of registered bank accounts for facilitator partner https://iris-docs.midtrans.com/#bank-accounts-facilitator
func (Client) GetPayoutDetails ¶
func (c Client) GetPayoutDetails(referenceNo string) (*PayoutDetailResponse, *midtrans.Error)
GetPayoutDetails : Get details of a single payout. https://iris-docs.midtrans.com/#get-payout-details
func (Client) GetTopUpChannels ¶
func (c Client) GetTopUpChannels() ([]TopUpAccountResponse, *midtrans.Error)
GetTopUpChannels : Provide top up information channel for Aggregator Partner https://iris-docs.midtrans.com/#top-up-channel-information-aggregator
func (Client) GetTransactionHistory ¶
func (c Client) GetTransactionHistory(fromDate string, toDate string) ([]TransactionHistoryResponse, *midtrans.Error)
GetTransactionHistory : Returns all the payout details for specific dates (https://iris-docs.midtrans.com/#payout-history)
func (Client) RejectPayout ¶
func (c Client) RejectPayout(req RejectPayoutReq) (*RejectPayoutResponse, *midtrans.Error)
RejectPayout : This method for Apporver to reject multiple payout request. https://iris-docs.midtrans.com/#reject-payouts
func (Client) UpdateBeneficiaries ¶
func (c Client) UpdateBeneficiaries(aliasName string, req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)
UpdateBeneficiaries : to update an existing beneficiary identified by its alias_name. https://iris-docs.midtrans.com/#update-beneficiaries
func (Client) ValidateBankAccount ¶
func (c Client) ValidateBankAccount(bankName string, accountNo string) (*BankAccountDetailResponse, *midtrans.Error)
ValidateBankAccount : Check if an account is valid, if valid return account information. (https://iris-docs.midtrans.com/#validate-bank-account)
type CreatePayoutDetailReq ¶
type CreatePayoutDetailReq struct { BeneficiaryName string `json:"beneficiary_name"` BeneficiaryAccount string `json:"beneficiary_account"` BeneficiaryBank string `json:"beneficiary_bank"` BeneficiaryEmail string `json:"beneficiary_email"` Amount string `json:"amount"` Notes string `json:"notes"` }
CreatePayoutDetailReq : Represent Create Payout detail payload Iris
type CreatePayoutDetailResponse ¶
type CreatePayoutDetailResponse struct { Status string `json:"status"` ReferenceNo string `json:"reference_no"` }
CreatePayoutDetailResponse : Represent Create payout detail response payload
type CreatePayoutReq ¶
type CreatePayoutReq struct {
Payouts []CreatePayoutDetailReq `json:"payouts"`
}
CreatePayoutReq : Represent Create Payout request payload Iris
type CreatePayoutResponse ¶
type CreatePayoutResponse struct { Payouts []CreatePayoutDetailResponse `json:"payouts"` ErrorMessage string `json:"error_message"` Errors interface{} `json:"errors"` }
CreatePayoutResponse : Represent Create payout response payload
type PayoutDetailResponse ¶
type PayoutDetailResponse struct { Amount string `json:"amount"` BeneficiaryName string `json:"beneficiary_name"` BeneficiaryAccount string `json:"beneficiary_account"` Bank string `json:"bank"` ReferenceNo string `json:"reference_no"` Notes string `json:"notes"` BeneficiaryEmail string `json:"beneficiary_email"` Status string `json:"status"` CreatedBy string `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ErrorMessage string `json:"error_message"` Errors string `json:"errors"` }
PayoutDetailResponse : Represent Payout detail response payload
type RejectPayoutReq ¶
type RejectPayoutReq struct { ReferenceNo []string `json:"reference_nos"` RejectReason string `json:"reject_reason"` }
RejectPayoutReq : Represent Reject Payout payload Iris
type RejectPayoutResponse ¶
type RejectPayoutResponse struct { Status string `json:"status"` ErrorMessage string `json:"error_message"` Errors []string `json:"errors"` }
RejectPayoutResponse : Represent Reject payout response payload
type ResponseWithMap ¶
type ResponseWithMap map[string]interface{}
type TopUpAccountResponse ¶
type TransactionHistoryResponse ¶
type TransactionHistoryResponse struct { Account string `json:"account"` Type string `json:"type"` Amount string `json:"amount"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` ReferenceNo string `json:"reference_no"` BeneficiaryName string `json:"beneficiary_name"` BeneficiaryAccount string `json:"beneficiary_account"` }