Payment
public final class Payment
Payment API
Note
Domestic instant payments, international payments, and scheduled payments are all accomplished from the same /payments endpoint. The payment type is automatically identified by our system depending whether the debtor and creditor accounts are from different countries (for international payments), or whether a value has been set for the scheduled_for parameter (meaning a scheduled payment).-
Opens bank application or bank website using with
id
of paymentDeclaration
Swift
func open(id: String, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
id
Unique id value of payment.
completion
It provides to handle result or error
-
Opens bank application or bank website using with request model of payment
Declaration
Swift
func initiate(request: PaymentCreateRequest, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
request
Request to create payment
completion
It provides to handle result or error
-
Opens bank application or bank website using with request model of refund
Declaration
Swift
func initiateRefund(request: PaymentCreateRefundRequest, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
request
Request to create refund
completion
It provides to handle result or error
-
Creates payment.
Declaration
Swift
func createPayment(request: PaymentCreateRequest, completion: @escaping (Result<PaymentCreateResponse, PayByBankError>) -> Void)
Parameters
request
Request to create payment.
completion
It provides to handle result or error.
-
Gets payments.
Declaration
Swift
func listPayments(request: PaymentListRequest, completion: @escaping (Result<PaymentListResponse, PayByBankError>) -> Void)
Parameters
request
Request to list of payments with filters.
completion
It provides to handle result or error.
-
Gets payment detail.
Declaration
Swift
func getPayment(request: PaymentGetRequest, completion: @escaping (Result<PaymentGetResponse, PayByBankError>) -> Void)
Parameters
request
Request to get payment detail with id.
completion
It provides to handle result or error.
-
Checks availability of payment url.
‘url-consumed’ endpoint checks whether the bank’s payment url has been visited by the PSU. Return’s true if the PSU has logged in to the banking system for this payment. In such case either wait for the PSU to finish the journey, or create a new payment.
Declaration
Swift
func checkPaymentURL(request: PaymentCheckURLRequest, completion: @escaping (Result<PaymentCheckURLResponse, PayByBankError>) -> Void)
Parameters
request
Request to check availability of payment url.
completion
It provides to handle result or error.
-
Creates refund for given payment
Declaration
Swift
func createRefund(request: PaymentCreateRefundRequest, completion: @escaping (Result<PaymentCreateRefundResponse, PayByBankError>) -> Void)
Parameters
request
Request to create refund for given payment.
completion
It provides to handle result or error.