Account

accountRegister

Registration action method, used to register a new merchant in the system.


/api/Account/Register

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Account/Register"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.AccountApi;

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

public class AccountApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        AccountApi apiInstance = new AccountApi();
        RegisterBindingModel model = ; // RegisterBindingModel | 
        try {
            Object result = apiInstance.accountRegister(model);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#accountRegister");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.AccountApi;

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        RegisterBindingModel model = ; // RegisterBindingModel | 
        try {
            Object result = apiInstance.accountRegister(model);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#accountRegister");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

RegisterBindingModel *model = ; // 

AccountApi *apiInstance = [[AccountApi alloc] init];

// Registration action method, used to register a new merchant in the system.
[apiInstance accountRegisterWith:model
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.AccountApi()

var model = ; // {RegisterBindingModel} 


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

namespace Example
{
    public class accountRegisterExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AccountApi();
            var model = new RegisterBindingModel(); // RegisterBindingModel | 

            try
            {
                // Registration action method, used to register a new merchant in the system.
                Object result = apiInstance.accountRegister(model);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountApi.accountRegister: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\AccountApi();
$model = ; // RegisterBindingModel | 

try {
    $result = $api_instance->accountRegister($model);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->accountRegister: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::AccountApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::AccountApi->new();
my $model = WWW::pbgClient::Object::RegisterBindingModel->new(); # RegisterBindingModel | 

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.AccountApi()
model =  # RegisterBindingModel | 

try: 
    # Registration action method, used to register a new merchant in the system.
    api_response = api_instance.account_register(model)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->accountRegister: %s\n" % e)

Parameters

Body parameters
Name Description
model *

Responses

Status: 200 - OK


Credit

creditAuthCaptureTransaction

Use this method to authorize and capture a credit card payment.


/api/Credit/AuthCaptureTransaction

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Credit/AuthCaptureTransaction"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.CreditApi;

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

public class CreditApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        CreditApi apiInstance = new CreditApi();
        AuthCaptureRequest captureRequest = ; // AuthCaptureRequest | AuthCaptureRequest
        try {
            TransactionResponse result = apiInstance.creditAuthCaptureTransaction(captureRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditAuthCaptureTransaction");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.CreditApi;

public class CreditApiExample {

    public static void main(String[] args) {
        CreditApi apiInstance = new CreditApi();
        AuthCaptureRequest captureRequest = ; // AuthCaptureRequest | AuthCaptureRequest
        try {
            TransactionResponse result = apiInstance.creditAuthCaptureTransaction(captureRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditAuthCaptureTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

AuthCaptureRequest *captureRequest = ; // AuthCaptureRequest

CreditApi *apiInstance = [[CreditApi alloc] init];

// Use this method to authorize and capture a credit card payment.
[apiInstance creditAuthCaptureTransactionWith:captureRequest
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.CreditApi()

var captureRequest = ; // {AuthCaptureRequest} AuthCaptureRequest


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

namespace Example
{
    public class creditAuthCaptureTransactionExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CreditApi();
            var captureRequest = new AuthCaptureRequest(); // AuthCaptureRequest | AuthCaptureRequest

            try
            {
                // Use this method to authorize and capture a credit card payment.
                TransactionResponse result = apiInstance.creditAuthCaptureTransaction(captureRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditApi.creditAuthCaptureTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\CreditApi();
$captureRequest = ; // AuthCaptureRequest | AuthCaptureRequest

try {
    $result = $api_instance->creditAuthCaptureTransaction($captureRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreditApi->creditAuthCaptureTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::CreditApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::CreditApi->new();
my $captureRequest = WWW::pbgClient::Object::AuthCaptureRequest->new(); # AuthCaptureRequest | AuthCaptureRequest

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.CreditApi()
captureRequest =  # AuthCaptureRequest | AuthCaptureRequest

try: 
    # Use this method to authorize and capture a credit card payment.
    api_response = api_instance.credit_auth_capture_transaction(captureRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditApi->creditAuthCaptureTransaction: %s\n" % e)

Parameters

Body parameters
Name Description
captureRequest *

Responses

Status: 200 - OK


creditGetSettledBatchList

Returns all Settled Batches for the last 30 days


/api/Credit/GetSettlementBatchList

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Credit/GetSettlementBatchList"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.CreditApi;

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

public class CreditApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        CreditApi apiInstance = new CreditApi();
        MerchantAuthentication merchantAuthentication = ; // MerchantAuthentication | 
        try {
            array[Batch] result = apiInstance.creditGetSettledBatchList(merchantAuthentication);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditGetSettledBatchList");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.CreditApi;

public class CreditApiExample {

    public static void main(String[] args) {
        CreditApi apiInstance = new CreditApi();
        MerchantAuthentication merchantAuthentication = ; // MerchantAuthentication | 
        try {
            array[Batch] result = apiInstance.creditGetSettledBatchList(merchantAuthentication);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditGetSettledBatchList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

MerchantAuthentication *merchantAuthentication = ; // 

CreditApi *apiInstance = [[CreditApi alloc] init];

// Returns all Settled Batches for the last 30 days
[apiInstance creditGetSettledBatchListWith:merchantAuthentication
              completionHandler: ^(array[Batch] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.CreditApi()

var merchantAuthentication = ; // {MerchantAuthentication} 


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

namespace Example
{
    public class creditGetSettledBatchListExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CreditApi();
            var merchantAuthentication = new MerchantAuthentication(); // MerchantAuthentication | 

            try
            {
                // Returns all Settled Batches for the last 30 days
                array[Batch] result = apiInstance.creditGetSettledBatchList(merchantAuthentication);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditApi.creditGetSettledBatchList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\CreditApi();
$merchantAuthentication = ; // MerchantAuthentication | 

try {
    $result = $api_instance->creditGetSettledBatchList($merchantAuthentication);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreditApi->creditGetSettledBatchList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::CreditApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::CreditApi->new();
my $merchantAuthentication = WWW::pbgClient::Object::MerchantAuthentication->new(); # MerchantAuthentication | 

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.CreditApi()
merchantAuthentication =  # MerchantAuthentication | 

try: 
    # Returns all Settled Batches for the last 30 days
    api_response = api_instance.credit_get_settled_batch_list(merchantAuthentication)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditApi->creditGetSettledBatchList: %s\n" % e)

Parameters

Body parameters
Name Description
merchantAuthentication *

Responses

Status: 200 - OK


creditGetTransactionList

Returns all transactions for the last 30 days


/api/Credit/GetTransactionList

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Credit/GetTransactionList"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.CreditApi;

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

public class CreditApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        CreditApi apiInstance = new CreditApi();
        MerchantAuthentication merchantAuthentication = ; // MerchantAuthentication | 
        try {
            array[Transaction] result = apiInstance.creditGetTransactionList(merchantAuthentication);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditGetTransactionList");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.CreditApi;

public class CreditApiExample {

    public static void main(String[] args) {
        CreditApi apiInstance = new CreditApi();
        MerchantAuthentication merchantAuthentication = ; // MerchantAuthentication | 
        try {
            array[Transaction] result = apiInstance.creditGetTransactionList(merchantAuthentication);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditGetTransactionList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

MerchantAuthentication *merchantAuthentication = ; // 

CreditApi *apiInstance = [[CreditApi alloc] init];

// Returns all transactions for the last 30 days
[apiInstance creditGetTransactionListWith:merchantAuthentication
              completionHandler: ^(array[Transaction] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.CreditApi()

var merchantAuthentication = ; // {MerchantAuthentication} 


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

namespace Example
{
    public class creditGetTransactionListExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CreditApi();
            var merchantAuthentication = new MerchantAuthentication(); // MerchantAuthentication | 

            try
            {
                // Returns all transactions for the last 30 days
                array[Transaction] result = apiInstance.creditGetTransactionList(merchantAuthentication);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditApi.creditGetTransactionList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\CreditApi();
$merchantAuthentication = ; // MerchantAuthentication | 

try {
    $result = $api_instance->creditGetTransactionList($merchantAuthentication);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreditApi->creditGetTransactionList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::CreditApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::CreditApi->new();
my $merchantAuthentication = WWW::pbgClient::Object::MerchantAuthentication->new(); # MerchantAuthentication | 

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.CreditApi()
merchantAuthentication =  # MerchantAuthentication | 

try: 
    # Returns all transactions for the last 30 days
    api_response = api_instance.credit_get_transaction_list(merchantAuthentication)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditApi->creditGetTransactionList: %s\n" % e)

Parameters

Body parameters
Name Description
merchantAuthentication *

Responses

Status: 200 - OK


creditRefundTransaction

Refund a transaction. Use this method only when the transaction has already been batched out. Other wise use the VoidTransaction


/api/Credit/RefundTransaction

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Credit/RefundTransaction"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.CreditApi;

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

public class CreditApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        CreditApi apiInstance = new CreditApi();
        RefundRequest refundRequest = ; // RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.
        try {
            CreditResponse result = apiInstance.creditRefundTransaction(refundRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditRefundTransaction");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.CreditApi;

public class CreditApiExample {

    public static void main(String[] args) {
        CreditApi apiInstance = new CreditApi();
        RefundRequest refundRequest = ; // RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.
        try {
            CreditResponse result = apiInstance.creditRefundTransaction(refundRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditRefundTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

RefundRequest *refundRequest = ; // RefundRequest containing all properties necessary to submit a refund transaction.

CreditApi *apiInstance = [[CreditApi alloc] init];

// Refund a transaction. Use this method only when the transaction has already been batched out. Other wise use the VoidTransaction
[apiInstance creditRefundTransactionWith:refundRequest
              completionHandler: ^(CreditResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.CreditApi()

var refundRequest = ; // {RefundRequest} RefundRequest containing all properties necessary to submit a refund transaction.


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

namespace Example
{
    public class creditRefundTransactionExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CreditApi();
            var refundRequest = new RefundRequest(); // RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.

            try
            {
                // Refund a transaction. Use this method only when the transaction has already been batched out. Other wise use the VoidTransaction
                CreditResponse result = apiInstance.creditRefundTransaction(refundRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditApi.creditRefundTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\CreditApi();
$refundRequest = ; // RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.

try {
    $result = $api_instance->creditRefundTransaction($refundRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreditApi->creditRefundTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::CreditApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::CreditApi->new();
my $refundRequest = WWW::pbgClient::Object::RefundRequest->new(); # RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.CreditApi()
refundRequest =  # RefundRequest | RefundRequest containing all properties necessary to submit a refund transaction.

try: 
    # Refund a transaction. Use this method only when the transaction has already been batched out. Other wise use the VoidTransaction
    api_response = api_instance.credit_refund_transaction(refundRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditApi->creditRefundTransaction: %s\n" % e)

Parameters

Body parameters
Name Description
refundRequest *

Responses

Status: 200 - OK


creditVoidTransaction

Void a transaction. Use this method only when the transaction has not been batched out. Other wise use the RefundTransaction


/api/Credit/VoidTransaction

Usage and SDK Samples

curl -X POST "https://pbggateway.azurewebsites.net/api/Credit/VoidTransaction"
import io.pbg.client.*;
import io.pbg.client.auth.*;
import io.pbg.client.model.*;
import io.pbg.client.api.CreditApi;

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

public class CreditApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        CreditApi apiInstance = new CreditApi();
        VoidRequest voidRequest = ; // VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.
        try {
            CreditResponse result = apiInstance.creditVoidTransaction(voidRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditVoidTransaction");
            e.printStackTrace();
        }
    }
}
import io.pbg.client.api.CreditApi;

public class CreditApiExample {

    public static void main(String[] args) {
        CreditApi apiInstance = new CreditApi();
        VoidRequest voidRequest = ; // VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.
        try {
            CreditResponse result = apiInstance.creditVoidTransaction(voidRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditApi#creditVoidTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

VoidRequest *voidRequest = ; // VoidRequest containing all properties necessary to submit a void transaction.

CreditApi *apiInstance = [[CreditApi alloc] init];

// Void a transaction. Use this method only when the transaction has not been batched out. Other wise use the RefundTransaction
[apiInstance creditVoidTransactionWith:voidRequest
              completionHandler: ^(CreditResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ClientpaymentBrokerApi = require('clientpayment_broker_api');
var defaultClient = ClientpaymentBrokerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ClientpaymentBrokerApi.CreditApi()

var voidRequest = ; // {VoidRequest} VoidRequest containing all properties necessary to submit a void transaction.


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

namespace Example
{
    public class creditVoidTransactionExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CreditApi();
            var voidRequest = new VoidRequest(); // VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.

            try
            {
                // Void a transaction. Use this method only when the transaction has not been batched out. Other wise use the RefundTransaction
                CreditResponse result = apiInstance.creditVoidTransaction(voidRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditApi.creditVoidTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
pbg\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new pbg\Client\Api\CreditApi();
$voidRequest = ; // VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.

try {
    $result = $api_instance->creditVoidTransaction($voidRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreditApi->creditVoidTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::pbgClient::Configuration;
use WWW::pbgClient::CreditApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::pbgClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::pbgClient::CreditApi->new();
my $voidRequest = WWW::pbgClient::Object::VoidRequest->new(); # VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.

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

# Configure OAuth2 access token for authorization: oauth2
pbg_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = pbg_client.CreditApi()
voidRequest =  # VoidRequest | VoidRequest containing all properties necessary to submit a void transaction.

try: 
    # Void a transaction. Use this method only when the transaction has not been batched out. Other wise use the RefundTransaction
    api_response = api_instance.credit_void_transaction(voidRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditApi->creditVoidTransaction: %s\n" % e)

Parameters

Body parameters
Name Description
voidRequest *

Responses

Status: 200 - OK