# Add Card(Create Binding)

## Add Card

![Figure 01: Choose Payment Method](/files/MZp106OhFgUNLBNt3YR1)

## Add PAYON Card

![Figure 02 - Add Payon Card](/files/oBIsj2VbCTF1PCroRQji)

## Add Credit/Debit Card

![Figure 03 - Add Credit/Debit Card](/files/BzB4Z3Gn0bNmlRN2gZfK)

## Implementation&#x20;

{% tabs %}
{% tab title="Web " %}

### Include PAYON's lib

{% hint style="info" %}
Add [PAYON's lib](/payons-library.md) helper for client side to your create binding page.

{% endhint %}

```html
  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
     <script th:src="@{../js/payonUtils.js}" charset="utf-8" type="text/javascript"></script>
  </html>
```

### Prepare Add Card Button

```html

<body>
    <button class="btn btn-primary" id= "addCard">ADD CARD</button>  	
 
</body>

```

### Prepare Add Card Scripts

```javascript
$("#addCard").click(function(){
		  
	var merchantId =  $('#merchantId').val();
	var termId = $('#termId').val();
	var clientId = $('#clientId').val();
	var env = $('#env').val();
	let payonUtils = new PayonUtils("","","",merchantId,termId,"",env,"",clientId);
	payonUtils.payonPgCreateBinding();
});
	  
```

{% endtab %}

{% tab title="Mobile Native" %}

### Prepare Scheme Format

#### Android&#x20;

```xml
<activity
    android:name="Your Activity"
    android:configChanges="orientation|screenSize"
    android:screenOrientation="portrait"
    android:exported="true">
    <intent-filter android:label="filter_title_view_app_from_web">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="payon.online.card"
            android:pathPrefix="/parameters"
            android:host="payon" />

    </intent-filter>
</activity>

```

###

#### IOS

```
<array>
	<dist>
		<key>CFBundleURLSchemes</key>
		<array>
			<string>payon.online.card</string>
		</array>
	</dist>
</array>
```

###

### Example Scheme Format

payon.online.card://payon/parameters/?targetType=${targetType}\&terminalID=${terminalID}\&merchantID=${merchantID}\&clientId=${clientId}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.payon.com.kh/getting-started-1/add-card-create-binding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
