PaymentServiceProtocol

public protocol PaymentServiceProtocol : AnyObject

Undocumented

  • Returns a list of payment providers.

    Declaration

    Swift

    func paymentProviders(completion: @escaping CompletionResult<PaymentProviders>)

    Parameters

    completion

    A completion callback, returning the payment list on success

  • Returns a payment providers.

    Declaration

    Swift

    func paymentProvider(id: String, completion: @escaping CompletionResult<PaymentProvider>)

    Parameters

    id

    The id of the payment provider

    completion

    A completion callback, returning the payment provider on success

  • Creates a payment request.

    Declaration

    Swift

    func createPaymentRequest(sourceDocumentLocation: String?,
                              paymentProvider: String,
                              recipient: String,
                              iban: String,
                              bic: String?,
                              amount: String,
                              purpose: String,
                              completion: @escaping CompletionResult<String>)

    Parameters

    sourceDocumentLocation

    The URI of the source document whenever the payment details were extracted by the Gini system beforehand (optional)

    paymentProvider

    The id of the target payment provider - see payment providers

    recipient

    The recipient of the payment

    iban

    The iban (international bank account number) of the payment recipient

    bic

    The bic (bank identifier code) for the payment

    amount

    The amount of the paymentt

    purpose

    The purpose of the payment, eg. the invoice or the customer identifier

    completion

    A completion callback, returning the payment request on success

  • Returns a payment request.

    Declaration

    Swift

    func paymentRequest(id: String,
                        completion: @escaping CompletionResult<PaymentRequest>)

    Parameters

    id

    The id of the payment request

    completion

    A completion callback, returning the payment request on success

  • Returns a list of payment requests.

    Declaration

    Swift

    func paymentRequests(limit: Int?,
                         offset: Int?,
                         completion: @escaping CompletionResult<PaymentRequests>)

    Parameters

    limit

    The maximum number of payment requests to return (default 20), (optional)

    offset

    A starting offset (default 0), (optional)

    completion

    A completion callback, returning the request list on success