> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/api-reference/finpay-pg/core-api/credit-card/advance-payment/save-card/transaction-using-stored-card/two-click-payment.md).

# Two Click Payment

**Two-click payment** is a payment model concept that refers to a simplified checkout process for online purchases. The idea behind two-click payment is to reduce the number of steps required for customers to complete a transaction, making the process fast and convenient. Since the customer's credit card data information is already stored, they only need to fill in the Card Security Code to process the transaction.

{% hint style="info" %}
**INFO**

Before doing this process, make sure you have done the [Retrieve Stored Card API](/api-reference/finpay-pg/core-api/credit-card/advance-payment/save-card/retrieve-stored-card.md) to get the credit card token used for the transaction.
{% endhint %}

| Environment | Method | URL                                                  |
| ----------- | ------ | ---------------------------------------------------- |
| Development | POST   | <https://devo.finnet.co.id/pg/payment/card/initiate> |
| Production  | POST   | <https://live.finnet.co.id/pg/payment/card/initiate> |

### Data Request <a href="#body-request" id="body-request"></a>

| No | Name          | Type                                                                    | Mandatory | Min Length | Max Length | Description             |
| -- | ------------- | ----------------------------------------------------------------------- | --------- | ---------- | ---------- | ----------------------- |
| 1  | order         | [Object](/api-reference/appendix/json-object/order-object.md)           | M         | 1          | 12         | Detail of Order         |
| 2  | customer      | [Object](/api-reference/appendix/json-object/customer-object.md)        | M         | 1          | 8          | Detail of Customer      |
| 3  | url           | [Object](/api-reference/appendix/json-object/url-object.md)             | M         | 1          | 4          | Detail of Url           |
| 4  | billing       | [Object](/api-reference/appendix/json-object/billing-object.md)         | O         | 1          | 1          | Detail of Billing       |
| 5  | shipping      | [Object](/api-reference/appendix/json-object/shipping-object.md)        | O         | 1          | 4          | Detail of Shipping      |
| 6  | meta          | [Object](/api-reference/appendix/json-object/meta-object.md)            | O         | 1          | 1          | Detail of MetaData      |
| 7  | card          | [Object](/api-reference/appendix/json-object/card-object.md)            | M         | 1          | 7          | Detail of Card          |
| 8  | recurring     | [Object](/api-reference/appendix/json-object/recurring-object.md)       | O         | 1          | 11         | Detail of Recurring     |
| 9  | sourceOfFunds | [Object](/api-reference/appendix/json-object/source-of-funds-object.md) | M         | 1          | 11         | Detail of SourceOfFunds |
| 10 | device        | [Object](/api-reference/appendix/json-object/device-object.md)          | O         | 1          | 7          | Detail of Device        |

#### Sample Request <a href="#sample-request" id="sample-request"></a>

```
{
  "customer": {
    "id": "hajar.finnet@gmail.com",
    "email": "hajar.finnet@gmail.com",
    "firstName": "Hajar",
    "lastName": "Ismail",
    "mobilePhone": "+6281286288844"
  },
  "order": {
    "id": "1685522371836",
    "amount": "1000",
    "currency": "IDR",
    "description": "Testing"
  },
  "url": {
    "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/tangkapCurl.php"
  },
  "card": {
    "token": "81b36a850c2e40458bad296f952084b516c919ca717d448722782769b81b9fd9",
    "storedOnFile": "STORED"
  },
  "sourceOfFunds": {
    "type": "cc"
  }
}
```

### Data Response <a href="#data-response" id="data-response"></a>

| No | Name            | Type                                                              | Mandatory | Min Length | Max Length | Description      |
| -- | --------------- | ----------------------------------------------------------------- | --------- | ---------- | ---------- | ---------------- |
| 1  | responseCode    | [Enum](/api-reference/appendix/enumeration/response-code-list.md) | M         | 1          | 7          | Response Code    |
| 2  | responseMessage | String                                                            | M         | 1          | 500        | Response Message |
| 3  | paymentCode     | String                                                            | O         | 1          | 30         | Payment Code     |
| 4  | redirecturl     | String                                                            | M         | 1          | 320        | Redirect URL     |
| 5  | expiryLink      | String                                                            | M         | 1          | 19         | Expiry Link      |
| 6  | processingTime  | Number                                                            | M         | 1          | 20         | Processing Time  |
| 7  | appurl          | String                                                            | O         | 1          | 320        | App URL          |
| 8  | imageurl        | String                                                            | O         | 1          | 320        | Image URL        |
| 9  | accountList     | Array                                                             | O         | 1          | 4          | Account List     |

#### Sample Response <a href="#sample-response" id="sample-response"></a>

```
{
  "responseCode": "2000000",
  "responseMessage": "Success",
  "redirecturl": "https://devo.finpay.id/pg/payment/card/saved/c5f6c6be1943b963ee764b374f8a24a708ed42c26a6727fb13d6c583b75db316",
  "expiryLink": "2023-06-01 15:39:31",
  "processingTime": 0.2061138153076172
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.finpay.id/api-reference/finpay-pg/core-api/credit-card/advance-payment/save-card/transaction-using-stored-card/two-click-payment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
