> For the complete documentation index, see [llms.txt](https://intella2.gitbook.io/scan2pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intella2.gitbook.io/scan2pay/api-specification.md).

# API Specification

## API function

Scan2Pay API includes:

| **Function**                                                                                                                               | ServiceType      | **Note**                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------------------------------------------------------------------ |
| [Merchant-presented QR codes](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/customer-scan)     | OLPay            | Obtain a URL to generate a QR code for consumer to scan                  |
| [Consumer-presented QR codes](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/merchant-scan)     | Micropay         | Consumer display the QR code on their mobile device for merchant to scan |
| [Credit card payment](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/credit-card)               | Payment          | Credit card authorization transaction                                    |
| [Refund](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/refund)                                 | Refund           | Payment refund                                                           |
| [Single transaction query](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/single-order-query)   | SingleOrderQuery | Query single transaction by order number                                 |
| [Multiple transactions query](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-specification/multi-order-query) | OrderQuery       | Query multiple transactions by date range                                |
| [New multiple transactions query](/scan2pay/api-specification/new-multiple-transactions-query.md)                                          | OrderQuery1.1    | New query multiple transactions by date range                            |

## **Merchant-presented QR codes**

Payee calls the Merchant-presented QR codes API to obtain a URL and display it as a QR code that allow consumer to scan by their mobile devices.

After the consumer scanned the QR code, a payment selection page will show. Consumer can select the payment method they prefer and proceed the payment in the payment app.

Payee calls the Query single transaction API or provide a [Payment Notification API ](https://intella2.gitbook.io/scan2pay/~/edit/drafts/-L_QN8wakNfvU4Ezi77d/api-callback)to obtain the payment result, to complete the transaction.

{% hint style="warning" %}
Merchant-presented QR codes is not available for come payment methods
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BCwbLOHCmN7uK9" %}
[Merchant-Presented QR Code](/scan2pay/api-specification/customer-scan.md)
{% endcontent-ref %}

## **Consumer-presented QR codes**

Payee scans the payment QR code that consumer presented on their mobile device and calls the Consumer-presented QR codes API to complete the transaction.

{% hint style="warning" %}
Consumer-presented QR codes is not available for some payment methods
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BDKTNzhFA0zYpm" %}
[Customer-Presented QR Code](/scan2pay/api-specification/merchant-scan.md)
{% endcontent-ref %}

## **Credit card payment**

Payee obtains the consumer’s credit card information and calls Credit card authorization API to process the transaction.

{% hint style="info" %}
To test the Credit card payment, please contact intella for the testing credit card number
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BEiIIp6KPAEY7S" %}
[Credit Card Payment](/scan2pay/api-specification/credit-card.md)
{% endcontent-ref %}

## **EasyCard manipulation**

Payee calls the EasyCard manipulation API to operate the reader to process the payment and refund etc.

{% hint style="info" %}
EasyCard Manipulation  API to be matched with the reader provided by intella. The reader connects internet and intella server via WiFi.
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BFzAbEBuR1vSdS" %}
[EasyCard Manipulation](/scan2pay/api-specification/easycard-api.md)
{% endcontent-ref %}

## Refund

The completed payment can be refunded through the Refund API.

{% hint style="info" %}
The actual time of refund depends on each payment provider.
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BOt39UyxOGJ0Qy" %}
[Refund](/scan2pay/api-specification/refund.md)
{% endcontent-ref %}

## **Single transaction query**

To query a single transaction result or order status by calling Single order query API.

{% content-ref url="/pages/-L\_Nr6BPmtySWWYi3x7L" %}
[Single Transaction Query](/scan2pay/api-specification/single-order-query.md)
{% endcontent-ref %}

## Multiple transactions query

To query transactions or orders during a certain period.

{% hint style="info" %}
The period of transaction query is specified in days.
{% endhint %}

{% content-ref url="/pages/-L\_Nr6BQfp9K8PSf89-O" %}
[Multiple Transactions Query](/scan2pay/api-specification/multi-order-query.md)
{% endcontent-ref %}
