Spenda.Services.Invigo

Accounts

accountNew

Registers a new Account for the calling user

Creates a new Account and returns the invitation URL for the user to complete signup.


/PaymentServices/Invigo/Account/{paymentProvider}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/PaymentServices/Invigo/Account/{paymentProvider}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AccountsApi apiInstance = new AccountsApi();
        String paymentProvider = paymentProvider_example; // String | Identifier of the Payment Services Provider the account belongs to

        try {
            newAccountResponse result = apiInstance.accountNew(paymentProvider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#accountNew");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String paymentProvider = new String(); // String | Identifier of the Payment Services Provider the account belongs to

try {
    final result = await api_instance.accountNew(paymentProvider);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->accountNew: $e\n');
}

import org.openapitools.client.api.AccountsApi;

public class AccountsApiExample {
    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String paymentProvider = paymentProvider_example; // String | Identifier of the Payment Services Provider the account belongs to

        try {
            newAccountResponse result = apiInstance.accountNew(paymentProvider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#accountNew");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AccountsApi *apiInstance = [[AccountsApi alloc] init];
String *paymentProvider = paymentProvider_example; // Identifier of the Payment Services Provider the account belongs to (default to null)

// Registers a new Account for the calling user
[apiInstance accountNewWith:paymentProvider
              completionHandler: ^(newAccountResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesInvigo = require('spenda_services_invigo');

// Create an instance of the API class
var api = new SpendaServicesInvigo.AccountsApi()
var paymentProvider = paymentProvider_example; // {String} Identifier of the Payment Services Provider the account belongs to

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.accountNew(paymentProvider, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class accountNewExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AccountsApi();
            var paymentProvider = paymentProvider_example;  // String | Identifier of the Payment Services Provider the account belongs to (default to null)

            try {
                // Registers a new Account for the calling user
                newAccountResponse result = apiInstance.accountNew(paymentProvider);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccountsApi.accountNew: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$paymentProvider = paymentProvider_example; // String | Identifier of the Payment Services Provider the account belongs to

try {
    $result = $api_instance->accountNew($paymentProvider);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountNew: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $paymentProvider = paymentProvider_example; # String | Identifier of the Payment Services Provider the account belongs to

eval {
    my $result = $api_instance->accountNew(paymentProvider => $paymentProvider);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->accountNew: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AccountsApi()
paymentProvider = paymentProvider_example # String | Identifier of the Payment Services Provider the account belongs to (default to null)

try:
    # Registers a new Account for the calling user
    api_response = api_instance.account_new(paymentProvider)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->accountNew: %s\n" % e)
extern crate AccountsApi;

pub fn main() {
    let paymentProvider = paymentProvider_example; // String

    let mut context = AccountsApi::Context::default();
    let result = client.accountNew(paymentProvider, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
paymentProvider*
String
Identifier of the Payment Services Provider the account belongs to
Required

Responses


Loans

loanApprove

Approves a Loan

Approves a Loan. The Repayment Schedule for the Loan Invoices will be created and the original Payment will proceed to Debit Successful.


/PaymentServices/Invigo/Loan/{loanID}/Approve

Usage and SDK Samples

curl -X POST \
 "https://api.dev.spenda.co/api/PaymentServices/Invigo/Loan/{loanID}/Approve"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LoansApi;

import java.io.File;
import java.util.*;

public class LoansApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        LoansApi apiInstance = new LoansApi();
        Integer loanID = 56; // Integer | Identifier the loan to approve.

        try {
            apiInstance.loanApprove(loanID);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoansApi#loanApprove");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer loanID = new Integer(); // Integer | Identifier the loan to approve.

try {
    final result = await api_instance.loanApprove(loanID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->loanApprove: $e\n');
}

import org.openapitools.client.api.LoansApi;

public class LoansApiExample {
    public static void main(String[] args) {
        LoansApi apiInstance = new LoansApi();
        Integer loanID = 56; // Integer | Identifier the loan to approve.

        try {
            apiInstance.loanApprove(loanID);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoansApi#loanApprove");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
LoansApi *apiInstance = [[LoansApi alloc] init];
Integer *loanID = 56; // Identifier the loan to approve. (default to null)

// Approves a Loan
[apiInstance loanApproveWith:loanID
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesInvigo = require('spenda_services_invigo');

// Create an instance of the API class
var api = new SpendaServicesInvigo.LoansApi()
var loanID = 56; // {Integer} Identifier the loan to approve.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.loanApprove(loanID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loanApproveExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new LoansApi();
            var loanID = 56;  // Integer | Identifier the loan to approve. (default to null)

            try {
                // Approves a Loan
                apiInstance.loanApprove(loanID);
            } catch (Exception e) {
                Debug.Print("Exception when calling LoansApi.loanApprove: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LoansApi();
$loanID = 56; // Integer | Identifier the loan to approve.

try {
    $api_instance->loanApprove($loanID);
} catch (Exception $e) {
    echo 'Exception when calling LoansApi->loanApprove: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LoansApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LoansApi->new();
my $loanID = 56; # Integer | Identifier the loan to approve.

eval {
    $api_instance->loanApprove(loanID => $loanID);
};
if ($@) {
    warn "Exception when calling LoansApi->loanApprove: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.LoansApi()
loanID = 56 # Integer | Identifier the loan to approve. (default to null)

try:
    # Approves a Loan
    api_instance.loan_approve(loanID)
except ApiException as e:
    print("Exception when calling LoansApi->loanApprove: %s\n" % e)
extern crate LoansApi;

pub fn main() {
    let loanID = 56; // Integer

    let mut context = LoansApi::Context::default();
    let result = client.loanApprove(loanID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
loanID*
Integer (int32)
Identifier the loan to approve.
Required

Responses


loanReject

Rejects a Loan

Rejects a loan previously created by processing an Invigo payment. The Loan Invoices will be updated to a status of Cancelled and the original Payment will be Failed.


/PaymentServices/Invigo/Loan/{loanID}/Reject

Usage and SDK Samples

curl -X POST \
 "https://api.dev.spenda.co/api/PaymentServices/Invigo/Loan/{loanID}/Reject"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LoansApi;

import java.io.File;
import java.util.*;

public class LoansApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        LoansApi apiInstance = new LoansApi();
        Integer loanID = 56; // Integer | Identifier the loan to reject.

        try {
            apiInstance.loanReject(loanID);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoansApi#loanReject");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer loanID = new Integer(); // Integer | Identifier the loan to reject.

try {
    final result = await api_instance.loanReject(loanID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->loanReject: $e\n');
}

import org.openapitools.client.api.LoansApi;

public class LoansApiExample {
    public static void main(String[] args) {
        LoansApi apiInstance = new LoansApi();
        Integer loanID = 56; // Integer | Identifier the loan to reject.

        try {
            apiInstance.loanReject(loanID);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoansApi#loanReject");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
LoansApi *apiInstance = [[LoansApi alloc] init];
Integer *loanID = 56; // Identifier the loan to reject. (default to null)

// Rejects a Loan
[apiInstance loanRejectWith:loanID
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesInvigo = require('spenda_services_invigo');

// Create an instance of the API class
var api = new SpendaServicesInvigo.LoansApi()
var loanID = 56; // {Integer} Identifier the loan to reject.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.loanReject(loanID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loanRejectExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new LoansApi();
            var loanID = 56;  // Integer | Identifier the loan to reject. (default to null)

            try {
                // Rejects a Loan
                apiInstance.loanReject(loanID);
            } catch (Exception e) {
                Debug.Print("Exception when calling LoansApi.loanReject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LoansApi();
$loanID = 56; // Integer | Identifier the loan to reject.

try {
    $api_instance->loanReject($loanID);
} catch (Exception $e) {
    echo 'Exception when calling LoansApi->loanReject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LoansApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LoansApi->new();
my $loanID = 56; # Integer | Identifier the loan to reject.

eval {
    $api_instance->loanReject(loanID => $loanID);
};
if ($@) {
    warn "Exception when calling LoansApi->loanReject: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.LoansApi()
loanID = 56 # Integer | Identifier the loan to reject. (default to null)

try:
    # Rejects a Loan
    api_instance.loan_reject(loanID)
except ApiException as e:
    print("Exception when calling LoansApi->loanReject: %s\n" % e)
extern crate LoansApi;

pub fn main() {
    let loanID = 56; // Integer

    let mut context = LoansApi::Context::default();
    let result = client.loanReject(loanID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
loanID*
Integer (int32)
Identifier the loan to reject.
Required

Responses


Transactions

calculateFee

Calculate_Fee


/PaymentServices/Invigo/Fee/{paymentProvider}/{accountGUID}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/PaymentServices/Invigo/Fee/{paymentProvider}/{accountGUID}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TransactionsApi;

import java.io.File;
import java.util.*;

public class TransactionsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        TransactionsApi apiInstance = new TransactionsApi();
        String paymentProvider = paymentProvider_example; // String | Payment Provider Name
        UUID accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Account GUID
        CalculateFeeRequest calculateFeeRequest = {"invoiceIDs":[0]}; // CalculateFeeRequest | 

        try {
            calculateFeeResponse result = apiInstance.calculateFee(paymentProvider, accountGUID, calculateFeeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsApi#calculateFee");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String paymentProvider = new String(); // String | Payment Provider Name
final UUID accountGUID = new UUID(); // UUID | Account GUID
final CalculateFeeRequest calculateFeeRequest = new CalculateFeeRequest(); // CalculateFeeRequest | 

try {
    final result = await api_instance.calculateFee(paymentProvider, accountGUID, calculateFeeRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->calculateFee: $e\n');
}

import org.openapitools.client.api.TransactionsApi;

public class TransactionsApiExample {
    public static void main(String[] args) {
        TransactionsApi apiInstance = new TransactionsApi();
        String paymentProvider = paymentProvider_example; // String | Payment Provider Name
        UUID accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Account GUID
        CalculateFeeRequest calculateFeeRequest = {"invoiceIDs":[0]}; // CalculateFeeRequest | 

        try {
            calculateFeeResponse result = apiInstance.calculateFee(paymentProvider, accountGUID, calculateFeeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsApi#calculateFee");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TransactionsApi *apiInstance = [[TransactionsApi alloc] init];
String *paymentProvider = paymentProvider_example; // Payment Provider Name (default to null)
UUID *accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Account GUID (default to null)
CalculateFeeRequest *calculateFeeRequest = {"invoiceIDs":[0]}; //  (optional)

// Calculate_Fee
[apiInstance calculateFeeWith:paymentProvider
    accountGUID:accountGUID
    calculateFeeRequest:calculateFeeRequest
              completionHandler: ^(calculateFeeResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesInvigo = require('spenda_services_invigo');

// Create an instance of the API class
var api = new SpendaServicesInvigo.TransactionsApi()
var paymentProvider = paymentProvider_example; // {String} Payment Provider Name
var accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Account GUID
var opts = {
  'calculateFeeRequest': {"invoiceIDs":[0]} // {CalculateFeeRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.calculateFee(paymentProvider, accountGUID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class calculateFeeExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new TransactionsApi();
            var paymentProvider = paymentProvider_example;  // String | Payment Provider Name (default to null)
            var accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Account GUID (default to null)
            var calculateFeeRequest = new CalculateFeeRequest(); // CalculateFeeRequest |  (optional) 

            try {
                // Calculate_Fee
                calculateFeeResponse result = apiInstance.calculateFee(paymentProvider, accountGUID, calculateFeeRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TransactionsApi.calculateFee: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TransactionsApi();
$paymentProvider = paymentProvider_example; // String | Payment Provider Name
$accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Account GUID
$calculateFeeRequest = {"invoiceIDs":[0]}; // CalculateFeeRequest | 

try {
    $result = $api_instance->calculateFee($paymentProvider, $accountGUID, $calculateFeeRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsApi->calculateFee: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TransactionsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TransactionsApi->new();
my $paymentProvider = paymentProvider_example; # String | Payment Provider Name
my $accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Account GUID
my $calculateFeeRequest = WWW::OPenAPIClient::Object::CalculateFeeRequest->new(); # CalculateFeeRequest | 

eval {
    my $result = $api_instance->calculateFee(paymentProvider => $paymentProvider, accountGUID => $accountGUID, calculateFeeRequest => $calculateFeeRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TransactionsApi->calculateFee: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.TransactionsApi()
paymentProvider = paymentProvider_example # String | Payment Provider Name (default to null)
accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Account GUID (default to null)
calculateFeeRequest = {"invoiceIDs":[0]} # CalculateFeeRequest |  (optional)

try:
    # Calculate_Fee
    api_response = api_instance.calculate_fee(paymentProvider, accountGUID, calculateFeeRequest=calculateFeeRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TransactionsApi->calculateFee: %s\n" % e)
extern crate TransactionsApi;

pub fn main() {
    let paymentProvider = paymentProvider_example; // String
    let accountGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let calculateFeeRequest = {"invoiceIDs":[0]}; // CalculateFeeRequest

    let mut context = TransactionsApi::Context::default();
    let result = client.calculateFee(paymentProvider, accountGUID, calculateFeeRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
paymentProvider*
String
Payment Provider Name
Required
accountGUID*
UUID (uuid)
Account GUID
Required
Body parameters
Name Description
calculateFeeRequest

Request containing a list of invoices to calculate fees for

Responses