Web Services
Introduction
The web services are used to retreive information about payments and plans that have already been entered into the system.
The web service requests use the async / await pattern for retreiving the information asynchronously. See this MSDN article for a detailed explaination.
Examples
| Type | Method | URL |
|---|---|---|
| WS | verify | https://ssodemo.acceleratepayments.com/webservices/sso.cfc?... |
| WS | getPlans | https://ssodemo.acceleratepayments.com/webservices/sso.cfc?... |
| WS | getSubscriptions | https://ssodemo.acceleratepayments.com/webservices/sso.cfc?... |
| WS | getTransactions | https://ssodemo.acceleratepayments.com/webservices/sso.cfc?... |
Get Payment Transactions Web Service
private async void button_Click(...)
{
ClearGage.SSO.Response.Transaction[] transactions =
await this.ssoHelper.GetPaymentTransactionsAsync(
startTime: Convert.ToDateTime("06/01/2014")
);
Console.WriteLine("Received " + transactions.Count() + " transaction[s].");
}
Get Payment Plans Web Service
private async void button_Click(...)
{
ClearGage.SSO.Response.PaymentPlan[] plans =
await this.ssoHelper.GetPaymentPlansAsync();
Console.WriteLine("Received " + plans.Count() + " plan[s].");
}
Get Payment Plan Encounters Web Service
private async void button_Click(...)
{
ClearGage.SSO.Response.Encounter[] encounters =
await this.ssoHelper.GetPaymentPlanEncountersAsync(
planId: "D4TQ435K-A4CRAIS2"
);
Console.WriteLine("Received " + encounters.Count() + " encounter[s].");
}
Get Payment Plan Procedures Web Service
private async void button_Click(...)
{
ClearGage.SSO.Response.Procedure[] procedures =
await this.ssoHelper.GetPaymentPlanProceduresAsync(
planId: "D4TQ435K-A4CRAIS2"
);
Console.WriteLine("Received " + procedures.Count() + " procedure[s].");
}
Get Subscriptions Web Service
private async void button_Click(...)
{
ClearGage.SSO.Response.Subscription[] subscriptions =
await this.ssoHelper.GetSubscriptionsAsync();
Console.WriteLine("Received " + subscriptions.Count() + " subscriptions[s].");
}
Make Swiped Credit Card Payment Web Service
private async void button_Click(...)
{
// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";
ClearGage.SSO.Response.Payment payment =
await this.ssoHelper.MakeSwipedCardPaymentAsync(
patient: patient,
amount: 25.00,
trackData: "%B4111111111111111^NAME ON CARD^1512105432112345678?;4111111111111111=15121015432112345678?"
);
Console.WriteLine("Transaction " + payment.Results);
}
Make Keyed Credit Card Payment Web Service
private async void button_Click(...)
{
// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";
ClearGage.SSO.Response.Payment payment =
await this.ssoHelper.MakeKeyedCardPaymentAsync(
patient: patient,
amount: 25.00,
cardNumber: "4111111111111111",
cardExp: "0415",
cardCvv: "999"
);
Console.WriteLine("Transaction " + payment.Results);
}
Make ACH Payment Web Service
private async void button_Click(...)
{
// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";
ClearGage.SSO.Response.Payment payment =
await this.ssoHelper.MakeAchPaymentAsync(
patient: patient,
amount: 25.00,
routingNumber: "123456789",
accountNumber: "00000000123",
accountType: "C"
);
Console.WriteLine("Transaction " + payment.Results);
}