# co-dotnet-sdk (Unsigned)
EBPP Hosted Forms API
- API version: 4.0.0
- Package version: 5.0.0.1
## Requirements
Building the API client library requires:
1. .Net 4.6.1
2. Required Packages:
* BouncyCastle (ver)1.8.5
* Newtonsoft.Json (ver)12.0.1
* RestSharp (ver)105.0.1
* Common.Logging (ver)3.4.1
* Common.Logging.Core (ver)3.4.1
* Common.Logging.Log4Net1211 (ver)3.4.1
## Installation
Download the latest library dependency and install it in your local repo and make it available in the classpath of your application.
(latest version is recommended) from ["here"](https://developers.orbipay.com/integration-guide-hosted-forms/#Server-sideIntegration),
##Invoke API
Code snippet to confirm payment token API.
```C#
using Com.Alacriti.Checkout.Model;
using Com.Alacriti.Checkout;
using Com.Alacriti.Checkout.Client;
class ConfirmPaymentTokenTest
{
static void main(String[] args)
{
InvocationContext invocation_context = new Com.Alacriti.Checkout.Api.InvocationContext(client_api_key, client_private_key, hwf_public_key);
Payment payment = new Com.Alacriti.Checkout.Api.Payment(customer_account_reference, amount)
.withToken(token, digi_sign)
.forClient(client_key, signature_key)
.withCustomFields(customFields)
.confirm(invocation_context, live_mode);
}
}
```
Code snippet to Add Funding Source
```C#
using Com.Alacriti.Checkout.Model;
using Com.Alacriti.Checkout;
using Com.Alacriti.Checkout.Client;
class ConfirmAddFunidingSourceTest
{
static void main(String[] args)
{
InvocationContext invocation_context = new Com.Alacriti.Checkout.Api.InvocationContext(client_api_key, client_private_key, hwf_public_key);
ConfirmFundAcctResponse confirmFundAcctResponse = new Com.Alacriti.Checkout.Api.FundingAccount()
.forClient(client_key, signature_key)
.withToken(token, digiSign)
.add(invocation_context, live_mode);
}
}
```
Code snippet to Update Funding Source
```C#
using Com.Alacriti.Checkout.Model;
using Com.Alacriti.Checkout;
using Com.Alacriti.Checkout.Client;
class ConfirmUpdateFunidingSourceTest
{
static void main(String[] args)
{
InvocationContext invocation_context = new Com.Alacriti.Checkout.Api.InvocationContext(client_api_key, client_private_key, hwf_public_key);
ConfirmFundAcctResponse confirmFundAcctResponse = new Com.Alacriti.Checkout.Api.FundingAccount()
.forClient(client_key, signature_key)
.withToken(token, digiSign)
.update(invocation_context, live_mode);
}
}
```
1. Input the customerAccountrefernce
and amount
provided in the Hosted Forms UI integration.
2. Provide the token
and digiSign
returned from the Hosted Forms UI integration.
3. Values for all the keys needed will be shared with the client by the EBPP team.
4. Use liveMode value as "true" for production environment and "false" for Sandbox/UAT environment.
5. Invoke the API and get the response.
For more details on this contact support@billerpayments.com
### Author
Devs-HWF