Spenda.Services.SplitPayments

Accounts

accountNewTrustedAgreement

Registers a new Account for the calling user

Creates a new Account and returns the new AccountGUID.


/PaymentServices/BankTransfer/Account/TrustedAgreement/{accountUsage}/{paymentProvider}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/PaymentServices/BankTransfer/Account/TrustedAgreement/{accountUsage}/{paymentProvider}" \
 -d ''
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
        String accountUsage = accountUsage_example; // String | The type of account to create
        NewSplitAccountTrustedAgreementRequest newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"}; // NewSplitAccountTrustedAgreementRequest | 

        try {
            newSplitAccountTrustedAgreementResponse result = apiInstance.accountNewTrustedAgreement(paymentProvider, accountUsage, newSplitAccountTrustedAgreementRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#accountNewTrustedAgreement");
            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
final String accountUsage = new String(); // String | The type of account to create
final NewSplitAccountTrustedAgreementRequest newSplitAccountTrustedAgreementRequest = new NewSplitAccountTrustedAgreementRequest(); // NewSplitAccountTrustedAgreementRequest | 

try {
    final result = await api_instance.accountNewTrustedAgreement(paymentProvider, accountUsage, newSplitAccountTrustedAgreementRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->accountNewTrustedAgreement: $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
        String accountUsage = accountUsage_example; // String | The type of account to create
        NewSplitAccountTrustedAgreementRequest newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"}; // NewSplitAccountTrustedAgreementRequest | 

        try {
            newSplitAccountTrustedAgreementResponse result = apiInstance.accountNewTrustedAgreement(paymentProvider, accountUsage, newSplitAccountTrustedAgreementRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#accountNewTrustedAgreement");
            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)
String *accountUsage = accountUsage_example; // The type of account to create (default to supplier)
NewSplitAccountTrustedAgreementRequest *newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"}; //  (optional)

// Registers a new Account for the calling user
[apiInstance accountNewTrustedAgreementWith:paymentProvider
    accountUsage:accountUsage
    newSplitAccountTrustedAgreementRequest:newSplitAccountTrustedAgreementRequest
              completionHandler: ^(newSplitAccountTrustedAgreementResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesSplitPayments = require('spenda_services_split_payments');

// Create an instance of the API class
var api = new SpendaServicesSplitPayments.AccountsApi()
var paymentProvider = paymentProvider_example; // {String} Identifier of the Payment Services Provider the account belongs to
var accountUsage = accountUsage_example; // {String} The type of account to create
var opts = {
  'newSplitAccountTrustedAgreementRequest': {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"} // {NewSplitAccountTrustedAgreementRequest} 
};

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

namespace Example
{
    public class accountNewTrustedAgreementExample
    {
        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)
            var accountUsage = accountUsage_example;  // String | The type of account to create (default to supplier)
            var newSplitAccountTrustedAgreementRequest = new NewSplitAccountTrustedAgreementRequest(); // NewSplitAccountTrustedAgreementRequest |  (optional) 

            try {
                // Registers a new Account for the calling user
                newSplitAccountTrustedAgreementResponse result = apiInstance.accountNewTrustedAgreement(paymentProvider, accountUsage, newSplitAccountTrustedAgreementRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccountsApi.accountNewTrustedAgreement: " + 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
$accountUsage = accountUsage_example; // String | The type of account to create
$newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"}; // NewSplitAccountTrustedAgreementRequest | 

try {
    $result = $api_instance->accountNewTrustedAgreement($paymentProvider, $accountUsage, $newSplitAccountTrustedAgreementRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountNewTrustedAgreement: ', $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
my $accountUsage = accountUsage_example; # String | The type of account to create
my $newSplitAccountTrustedAgreementRequest = WWW::OPenAPIClient::Object::NewSplitAccountTrustedAgreementRequest->new(); # NewSplitAccountTrustedAgreementRequest | 

eval {
    my $result = $api_instance->accountNewTrustedAgreement(paymentProvider => $paymentProvider, accountUsage => $accountUsage, newSplitAccountTrustedAgreementRequest => $newSplitAccountTrustedAgreementRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->accountNewTrustedAgreement: $@\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)
accountUsage = accountUsage_example # String | The type of account to create (default to supplier)
newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"} # NewSplitAccountTrustedAgreementRequest |  (optional)

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

pub fn main() {
    let paymentProvider = paymentProvider_example; // String
    let accountUsage = accountUsage_example; // String
    let newSplitAccountTrustedAgreementRequest = {"businessName":"string","email":"string","bsbNumber":"string","accountNumber":"string","tsAndCsZeptoDirectDebitRequestAndServiceAgreementAgreedTo":true,"tsAndCsZeptoDirectDebitRequestURLAgreedTo":"string","tsAndCsZeptoDirectDebitRequestServiceAgreementURLAgreedTo":"string","friendlyName":"string"}; // NewSplitAccountTrustedAgreementRequest

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

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

Scopes

Parameters

Path parameters
Name Description
paymentProvider*
String
Identifier of the Payment Services Provider the account belongs to
Required
accountUsage*
String
The type of account to create
Required
Body parameters
Name Description
newSplitAccountTrustedAgreementRequest

Responses


Public

webhook

Webhook Callback

Webhook Callback


/PaymentServices/BankTransfer/Webhook

Usage and SDK Samples

curl -X POST \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/PaymentServices/BankTransfer/Webhook" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PublicApi;

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

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

        // Create an instance of the API class
        PublicApi apiInstance = new PublicApi();
        SplitPaymentsEvent splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0}; // SplitPaymentsEvent | 

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

final api_instance = DefaultApi();

final SplitPaymentsEvent splitPaymentsEvent = new SplitPaymentsEvent(); // SplitPaymentsEvent | 

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

import org.openapitools.client.api.PublicApi;

public class PublicApiExample {
    public static void main(String[] args) {
        PublicApi apiInstance = new PublicApi();
        SplitPaymentsEvent splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0}; // SplitPaymentsEvent | 

        try {
            apiInstance.webhook(splitPaymentsEvent);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#webhook");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PublicApi *apiInstance = [[PublicApi alloc] init];
SplitPaymentsEvent *splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0}; //  (optional)

// Webhook Callback
[apiInstance webhookWith:splitPaymentsEvent
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesSplitPayments = require('spenda_services_split_payments');

// Create an instance of the API class
var api = new SpendaServicesSplitPayments.PublicApi()
var opts = {
  'splitPaymentsEvent': {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0} // {SplitPaymentsEvent} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new PublicApi();
            var splitPaymentsEvent = new SplitPaymentsEvent(); // SplitPaymentsEvent |  (optional) 

            try {
                // Webhook Callback
                apiInstance.webhook(splitPaymentsEvent);
            } catch (Exception e) {
                Debug.Print("Exception when calling PublicApi.webhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PublicApi();
$splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0}; // SplitPaymentsEvent | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PublicApi->new();
my $splitPaymentsEvent = WWW::OPenAPIClient::Object::SplitPaymentsEvent->new(); # SplitPaymentsEvent | 

eval {
    $api_instance->webhook(splitPaymentsEvent => $splitPaymentsEvent);
};
if ($@) {
    warn "Exception when calling PublicApi->webhook: $@\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.PublicApi()
splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0} # SplitPaymentsEvent |  (optional)

try:
    # Webhook Callback
    api_instance.webhook(splitPaymentsEvent=splitPaymentsEvent)
except ApiException as e:
    print("Exception when calling PublicApi->webhook: %s\n" % e)
extern crate PublicApi;

pub fn main() {
    let splitPaymentsEvent = {"event":{"type":"string","at":"string","who":{"account_id":"string","account_type":"string","bank_account_id":"string"}},"data":[{}],"requestID":"string","providerTenant":0}; // SplitPaymentsEvent

    let mut context = PublicApi::Context::default();
    let result = client.webhook(splitPaymentsEvent, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
splitPaymentsEvent

Responses