Skip to main content

Uniphore Customer Portal

Creating and Using the Payment Integration Point

The Integration Point (IP) used in our example secure payment Flow calls a web service to perform the payment operation on the specified Payment Gateway.

Since the X‑Platform Server receives no actual credit card information (except for the amount to be charged), the following inputs need to be passed to the web service:

  • The credit card token sent to the Uniphore client by the Payment Gateway (via the Application Extension).

  • The API secret key associated with the Payment Gateway. (This key is usually the bearer token provided by your Payment Gateway to your account.) To locate your secret key, log into your Payment Gateway account and search the dashboard.

Here's an example taken from Stripe:

CreatingPayment-StripeAPIKeys.png

The web service called by the Integration Point is generally the payment API provided by the relevant Payment Gateway. Both SOAP and REST web service calls are supported.

Note

To help you get started, we've created some example resources for implementing secure payments that you'll find attached at the bottom of the article Designing the Payment Flow. Follow the instructions there to download and deloy the example files.

The following sections describe how our example Integration Point is built and used.

Working with the Secure Payment Integration Point

This section provides a high level summary of how the example payment Integration Point is built. For complete details about creating Integration Points, click here.

The Integration Point provided in our sample Flows involves a REST API call to the Stripe Payment Gateway. The following shows a CURL example for a charge call to Stripe:

curl https://api.stripe.com/v1/charges \
 -u sk_test_YlYkI08Gt39bEjdFGZUTcoCS: \
 -d amount=400 \
 -d currency=usd \
 -d source=tok_17Ct6VAAu11TRnY5gpHJr0C3 \
 -d description="Charge for test@example.com”

The parameters passed in this API call are listed in the following table. The -u parameter is the authorization header. The -d parameters are passed in the body, in query format.

Parameter

Description

-u

The secret key associated with the Stripe payment gateway account.

-d amount

The amount to be charged (in cents).

-d currency

The currency involved (U.S. dollars).

-d source

The credit card token returned by the Stripe payment gateway.

-d description

Information related to the API call. In this example, the description is hard coded.

To support this web service call, the request parameters of the REST Integration Point created in the X-Console include the amount to be charged, the credit card token, and a description. These arguments are passed in the body of the request in Query string format.

The secret key is passed in the Authorization header as Bearer sk_test_YlYkI08Gt39bEjdFGZUTcoCS

360008360291-StripeChargeIP-SecurePaymentsExample1_300718.png
Using the Integration Point Element in the Flow

When you have created the Integration Point, it is assigned to an Integration Point element that is added to your Payment Flow:

PaymentInteractionDesign3_300718.png

Above, we assign the StripeCharge IP provided in our example resources using the following mapped Input Variables:

  • amount: This value is taken from the answer to the Payment question. Using our Embedded Payment Form Flow example, we would enter the name of the HTML Reference ID variable (in this case Embedded Payment.Embedded Payment).

  • token: This value is taken from the User Variable that was set in the example Application Extension.

  • description: This value can be set according to your needs.

The mapped Output Variable, stored in the IP result field, will be available for use in the Response element of our Flow.