PaymentCreateRequest
public struct PaymentCreateRequest : Codable
Request model to create Payment.
-
The URL of the Tenant that the PSU will be redirected at the end of the payment journey.
Warning
This URL must be registered by your Admin on the Ecospend Management Console, prior to being used in the API calls.Declaration
Swift
public let redirectURL: String
-
Unique identification string assigned to the bank by our system.
Declaration
Swift
public let bankID: String
-
Payment amount in decimal format.
Declaration
Swift
public let amount: Decimal
-
Currency code in ISO 4217 format.
Note
Enum: “GBP” “USD” “EUR”Declaration
Swift
public let currency: PayByBankCurrency
-
Description for the payment. 255 character MAX.
Declaration
Swift
public let description: String?
-
Payment reference that will be displayed on the bank statement. 18 characters MAX.
Declaration
Swift
public let reference: String
-
If you are providing our Payment service to your own business clients (merchants), then you should set the Id of your merchant.
Declaration
Swift
public let merchantID: String?
-
The Id of the end-user. If you are providing this service directly to the end-users, then you can assign that Id to this parameter. If you are providing this service to businesses, then you should assign the Id of that merchant’s user.
Declaration
Swift
public let merchantUserID: String?
-
It is the account that will receive the payment.
Declaration
Swift
public let creditorAccount: PayByBankAccountRequest
-
It is the account from which the payment will be taken.
Declaration
Swift
public let debtorAccount: PayByBankAccountRequest?
-
Additional fields for a payment that can be mandotary for specific cases.
Declaration
Swift
public let paymentOption: PaymentOption?
-
It determines which type of payment operation will be executed by the Gateway.
Note
Enum: “Auto” “Domestic” “DomesticScheduled” “International” “InternationalScheduled”Declaration
Swift
public let paymentType: PaymentType?
-
init(redirectURL:
bankID: amount: currency: description: reference: merchantID: merchantUserID: creditorAccount: debtorAccount: paymentOption: paymentType: ) Creates an instance from the specified parameters.
Declaration
Swift
public init(redirectURL: String, bankID: String, amount: Decimal, currency: PayByBankCurrency, description: String? = nil, reference: String, merchantID: String? = nil, merchantUserID: String? = nil, creditorAccount: PayByBankAccountRequest, debtorAccount: PayByBankAccountRequest? = nil, paymentOption: PaymentOption? = nil, paymentType: PaymentType? = nil)
Parameters
redirectURL
The URL of the Tenant that the PSU will be redirected at the end of the payment journey.
bankID
Unique identification string assigned to the bank by our system.
amount
Payment amount in decimal format.
currency
Instance’s
PayByBankCurrency
, which is currency code in ISO 4217 format.description
Description for the payment. 255 character MAX.
reference
Payment reference that will be displayed on the bank statement. 18 characters MAX.
merchantID
If you are providing our Payment service to your own business clients (merchants), then you should set the Id of your merchant.
merchantUserID
The Id of the end-user.
creditorAccount
Instance’s
PayByBankAccountRequest
, which is the account that will receive the payment.debtorAccount
Instance’s
PayByBankAccountRequest
, which is the account from which the payment will be taken.paymentOption
Instance’s
PaymentOption
, which is additional fields for a payment that can be mandotary for specific cases.paymentType
Instance’s
PaymentType
, which determines which type of payment operation will be executed by the Gateway.