API Concept

Restful API is on of the standard to connect SaaS. API is simply 4 actions, which are GET(Read), POST(Create), PUT(Update) and DELETE(Delete), with an url address to specific SaaS endpoint.

We will take Stripe API (https://stripe.com/docs/api) as an example and you can get connected to any other SaaS using the same mechanism. Please be reminded that you're not required to implement Stripe API within Abtitu. Simply use "Make Payment" component to create payment in your app.

GET (Read)

It used to get information from SaaS. In most of the cases, SaaS will return data with JSON format.

Example

List out all the charges we received from Stripe.

1. Sign in Stripe developer account.
2. Get the API key from Stripe developer dashboard.
3. Prepare the configuration information as below
    API Endpoint: https://api.stripe.com/v1/charges
    API Key: {Step 2}
    Method: GET(Read)
4. Use "Connect Server" component with the above setting.

POST (Create)

It used to pass information to SaaS.

Example

Create a charge to Stripe.

1. Sign in Stripe developer account.
2. Get the API key from Stripe developer dashboard.
3. Prepare the configuration information as below
    API Endpoint: https://api.stripe.com/v1/charges
    API Key: {Step 2}
    Method: POST(Create)
    Content: { amount : 1000 
               currency : HKD
               source : tok_visa
             }
4. Use "Connect Server" component with the above setting.

PUT (Update)

It used to update existing information stored in SaaS. The mechanism is similar to POST but only change the method to PUT.

DELETE (Delete)

It used to delete existing information stored in SaaS.

Example

Delete a customer record stored in SaaS

1. Sign in Stripe developer account.
2. Get the API key from Stripe developer dashboard.
3. Prepare the configuration information as below
    API Endpoint: https://api.stripe.com/v1/customers/{CUSTOMER_ID}
    API Key: {Step 2}
    Method: DELETE(Delete)
4. Use "Connect Server" component with the above setting.

results matching ""

    No results matching ""