VRPlink
public final class VRPlink
VRPlink (Variable Recurring Payments) API
Note
Variable Recurring Payments (VRPs) let customers safely connect authorised payments providers to their bank account so that they can make payments on the customer’s behalf, in line with agreed limits. VRPs offer more control and transparency than existing alternatives, such as Direct Debit payments.-
Opens webview using with
uniqueID
,url
andredirectURL
of VRPlink.Note
This method does not require authentication.
Declaration
Swift
func open(uniqueID: String, url: URL, redirectURL: URL, viewController: UIViewController, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
uniqueID
A system assigned unique identification for the VRPlink.
url
Unique VRPlink URL that you will need to redirect PSU in order the payment to proceed.
redirectURL
The URL of the Tenant that the PSU will be redirected at the end of payment process.
viewController
Instance’s
UIViewController
, which provides to present bank selection.completion
It provides to handle
PayByBankResult
orPayByBankError
. -
Opens webview using with
uniqueID
of VRPlink.Note
This method requires authentication.
Declaration
Swift
func open(uniqueID: String, viewController: UIViewController, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
uniqueID
A system assigned unique identification for the VRPlink.
viewController
Instance’s
UIViewController
, which provides to present bank selection.completion
It provides to handle
PayByBankResult
orPayByBankError
. -
Opens webview using with request model of VRPlink.
Note
This method requires authentication.
Declaration
Swift
func initiate(request: VRPlinkCreateRequest, viewController: UIViewController, completion: @escaping (Result<PayByBankResult, PayByBankError>) -> Void)
Parameters
request
Instance’s
VRPlinkCreateRequest
, which is request model to create VRPlink.viewController
Instance’s
UIViewController
, which provides to present bank selection.completion
It provides to handle
PayByBankResult
orPayByBankError
. -
Creates VRPlink.
Note
This method requires authentication.
Declaration
Swift
func createVRPlink(request: VRPlinkCreateRequest, completion: @escaping (Result<VRPlinkCreateResponse, PayByBankError>) -> Void)
Parameters
request
Instance’s
VRPlinkCreateRequest
, which is request model to create VRPlink.completion
It provides to handle
VRPlinkCreateResponse
orPayByBankError
. -
Gets VRPlink detail.
Note
This method requires authentication.
Declaration
Swift
func getVRPlink(request: VRPlinkGetRequest, completion: @escaping (Result<VRPlinkGetResponse, PayByBankError>) -> Void)
Parameters
request
Instance’s
VRPlinkGetRequest
, which is request model to get details of VRPlink.completion
It provides to handle
VRPlinkGetResponse
orPayByBankError
. -
Soft deletes the VRPlink with given id.
Note
This method requires authentication.
Declaration
Swift
func deactivateVRPlink(request: VRPlinkDeleteRequest, completion: @escaping (Result<Bool, PayByBankError>) -> Void)
Parameters
request
Instance’s
VRPlinkDeleteRequest
, which is request model to delete VRPlink.completion
It provides to handle
Bool
orPayByBankError
. -
Returns records of VRPlink.
Note
This method requires authentication.
Declaration
Swift
func getVRPlinkRecords(request: VRPlinkGetRecordsRequest, completion: @escaping (Result<VRPlinkGetRecordsResponse, PayByBankError>) -> Void)
Parameters
request
Instance’s
VRPlinkGetRecordsRequest
, which is request model to get records of VRPlink.completion
It provides to handle
VRPlinkGetRecordsResponse
orPayByBankError
.