---
page_source: https://juspay.io/in/docs/ec-headless/cordova/base-sdk-integration/making-a-payment
page_title: 5. Making a Payment
---


## 5. Making a Payment



Once the checkout page is rendered, your users may proceed with payments. Payment initiation has two steps to it:

1. [Order Creation](https://docs.juspay.in/ec-headless/cordova/base-sdk-integration/making-a-payment#5.1.-Order-Creation)
2. [Transaction Initiation](https://docs.juspay.in/ec-headless/cordova/base-sdk-integration/making-a-payment#5.2.-Transaction-Initiation)

Following sections describe how to complete the steps above -


### 5.1. Order Creation



Create an order that is a representation of your shopping cart. The order contains important information like amount, customer details, shipping address, billing address, etc. Only after an order is created at Juspay end, the payment can be initiated.To create an order follow the step below -


### Step 5.1.a. Call Create Order API


Call [Create Order API](https://docs.juspay.in/ec-headless/cordova/base-sdk-integration/create-order-api)[](https://docs.juspay.in/ec-headless/cordova/base-sdk-integration/create-order-api)to create an order_id at Juspay end and get the corresponding client_auth_token

> **Warning**
> client_auth_token is valid only for 15 mins and is used for frontend authentication of SDK/client side calls.






### 5.2. Transaction Initiation



Transaction initiation involves a `process` SDK call from the merchant application with a process payload based on the payment method selected by your user. To inititate a transaction, follow the steps below -


### Step 5.2.a. Process SDK Call for Transaction Initiation


A process SDK call is to be made with a process payload based on the payment method selected by the user. For sample request and response payloads for different process SDK calls, please refer to the [payload samples](https://docs.juspay.in/ec-headless/cordova/payloads/payload-samples)page and use the dropdown menus to select the appropriate category and flows.

> **Warning**
> Process SDK call is to be made on the same instance of HyperService using which initiate API was triggered. It should not be called on an HyperSDK instance which has not been initiated.





#### Code Snippets: -

#### Javascript Code Snippet:

```javascript
hyperSDKRef.process(JSON.stringify(completePayload));
```



### Step 5.2.b. Consume Process SDK Response


Upon receiving the process call, the SDK internally initiates a transaction request to Juspay servers. Process response is returned as an SDK callback to the merchant application post payment completion.

