14
Integrate MULE ESB with Stripe By Ramakrishna Narkedamilli

Mule ESB integration with Stripe

Embed Size (px)

Citation preview

Page 1: Mule ESB integration with Stripe

Integrate MULE ESB with Stripe

By Ramakrishna Narkedamilli

Page 2: Mule ESB integration with Stripe

Overview:

MuleSoft is a popular ESB technology to integrate Different on-premise and cloud applications for data exchange. Stripe is an American company that allows both private individuals and businesses to accept payments over the Internet. Stripe specifically focuses on providing the technical, fraud prevention, and banking infrastructure required to operate online payment systems. The Mule Stripe Connector enables developers to interact with Stripe API to accept payments, create invoices, coupons, cards and other various actions

Page 3: Mule ESB integration with Stripe

Prerequisites:

Stripe developer account. Stripe API key. Mule Anypoint Stripe connector.

Page 4: Mule ESB integration with Stripe

Stripe Developer Account Setup:

For this sample purpose, we need developer Stripe account. We can sign up for free at https://dashboard.stripe.com/login

Page 5: Mule ESB integration with Stripe

Stripe API key Value:

Stripe developer account provides various options to control the communication between Stripe API to other applications. To access the full features of Stripe and connect with it, we need Stripe API key (For Test environment use Test Secret key). These values available under Stripe Account settings

Page 6: Mule ESB integration with Stripe

Mule Anypoint Stripe Connector:

Stripe is a online payment provider. Mule Stripe connector gives the options to integrate Stripe to perform the below options

CRUD for Customers Accepts Payments CRUD for Coupons Create Invoices , plans , subscriptions etc.

Page 7: Mule ESB integration with Stripe

MULE ESB Flows for Stripe Integration

The below Mule application is used to create Customer and Coupon under Stripe using Mule Anypoint Stripe connector

Page 8: Mule ESB integration with Stripe

Steps to be followed for integrating ‘Stripe’ with MuleSoft Applications:

Install the Stripe Connector in Anypoint Studio (3.5 and above)http://repository.mulesoft.org/connectors/releases/3.5

Page 9: Mule ESB integration with Stripe

Create a new Anypoint Studio Project and Flow to create customer and coupon Configure the Stripe global element in global elements section by providing the

Stripe API key

Page 10: Mule ESB integration with Stripe

In the flow first add HTTP inbound endpoint to trigger the service.

Add choice router to route the control to create customer or create coupon based on request action query parameter.

Now at this position we are integrated with Stripe to perform actions.

Page 11: Mule ESB integration with Stripe

Running and Testing the Application:

Right-click on the application Run Mule Application. Open the browser and hit the URL http

://localhost:8084/?action=createCustomer&[email protected].

Service will create the new customer in Stripe account in case of no errors.

Now, trigger the URL http://localhost:8084/?action=createCoupon&couponID=25PercentFestivalDiscount&percentOffpercentOff=5

Service will create new coupon under coupons sections if there no errors.

Page 12: Mule ESB integration with Stripe

Customer Creation under Stripe:

Page 13: Mule ESB integration with Stripe

Coupon Creation under Stripe:

Page 14: Mule ESB integration with Stripe

THANKS YOU By Ramakrishna Narkedamilli