/
Work with Payment Requests
Work with Payment Requests
After initializing
GiniBankAPI
andGiniBank
, get thepaymentRequestID
inAppDelegate
. For handling incoming URLs, use the code snippet:
func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
receivePaymentRequestId(url: url) { result in
switch result {
case let .success(requestId):
self.paymentRequestId = requestId
case .failure:
break
}
}
return true
}
After receiving the payment request ID, you can get fetch the payment information:
bankSDK.receivePaymentRequest(paymentRequestId: appDelegate.paymentRequestId)
The method above returns the completion block with the struct
PaymentRequest
, which includes recipient, IBAN, amount, and purpose fields.After a user clicked pay you need to resolve the payment request. The following method returns the completion block with the struct
ResolvedPaymentRequest
, which includesrequesterUri
for redirecting back to the payment requester’s app.If the payment request is successfully resolved, let the user redirect back to the payment requester app:
Reference documentation for GPC is available here.
, multiple selections available,
Related content
Return Assistant Features
Return Assistant Features
Read with this
Work with Payment Requests
Work with Payment Requests
More like this
API Reference
API Reference
Read with this
Work with Payment Requests
Work with Payment Requests
More like this
Features
Features
Read with this
Work with Payment Requests
Work with Payment Requests
More like this