In-Store API
Citcon offers a full set of RESTful POS APIs. These APIs help developers build fully functional and customizable integrated payment solutions that accept Alipay, WeChat Pay, PayPal, Venmo, UnionPay and others. And the APIs can be used on various devices, including but not limited to, payment terminals, mobile devices and POS devices.
Using an API solution can allow transactions to be processed directly from a merchant’s POS or mobile device in a seamless checkout experience for consumers. Transactions are processed in real time to allow merchants to make informed decisions about the transaction and how to proceed with the sale or refund.
Where you have the descriptions of the calls, this information should be moved to where the parameters are detailed
POS initialize
The initialize API returns detailed merchant information for a POS to initialize. This connection confirms that the POS can transmit data once the initialization is complete.
Returns: This call returns detailed merchant information if token is accepted otherwise, an error is returned.
POS Pay (Scan QR)
Citcon recommends using this call for payment when a merchant is scanning a consumer’s wallet for payment. The POS Pay call accepts an alphanumeric payment code (usually obtained by the merchant by scanning a barcode or QR code from the consumer’s payment app), that authorizes a transaction with corresponding payment providers. There is no need to specify which payment provider, the numeric payment code embeds this information automatically. With this call, there is an opportunity to send in a unique reference ID that is meaningful to the merchant. In cases where split tender is supported in the same reference ID, there is opportunity to append the reference ID with additional characters in order to link it back to the one sale ID in the merchant’s POS.
Returns: Returns result of the transaction i.e. success or fail.
POS Show QR
The POS Show QR API accepts a request from the merchant to generate a payment QR code. The consumer scans the QR code to complete the payment.
Returns: Returns result of the transaction i.e. success or fail.
POS Inquire
The POS Inquire API sends a transaction ID and returns the status and details of the transaction.
In many wallet POS payments, consumers may be prompted to authorize payment after their payment codes are scanned by POS. This is to ensure the payments are indeed authorized by the account holders in order to reduce fraud and chargeback risks. In this scenario, the POS Inquire API will return “09” as code, to indicate that this transaction is in a pending state while the consumer authorizes the transaction. The POS needs to inquire for the status periodically in order to get the finalized status of the transaction
Returns: Returns result of the transaction i.e. success or fail.
POS refund
The POS refund API uses a transaction_id or transaction_reference with the desired refund amount (less than or equal to the original purchase) and authorizes a refund. A paid transaction can be refunded as a whole, or as multiple partial refunds.
For the purposes of this request, a request can be made using the transaction_ID that was generated by Citcon at the time of the POS Pay API request, or alternatively using the transaction_reference that was provided by the merchant POS.
Returns: Returns result of the refund request i.e. success or fail.
POS Cancel
To specifically cancel a wallet transaction, the Cancel API can be used to send the request. If the payment status is unpaid, the transaction will be closed, however if the payment status is paid, the transaction will be refunded. Transactions created less than 15 seconds prior to the cancel request, or transactions that have already been settled cannot be canceled.
Returns: Returns result of the cancellation request i.e. success or fail.
initialize
The Initialize API returns detailed merchant information for a POS to initialize. This connection confirms that the POS can transmit data once the initialization is complete. The Charge request is the endpoint the merchant will call when initiating a payment request. This endpoint will be the unified API point to initiate all transactions with the params being passed by the merchant being dependent on the overall consumer use case as well as the merchant gateway provider and region.
Charge API clusters include charge creation and charge authorization.
Returns: This call returns detailed merchant information if the token is accepted, otherwise an error is returned.
Attributes
End Point
Request
Response
POS Pay
(Citcon Recommended Payment Option)
Citcon recommends using this call for payment when a merchant is scanning a consumer’s wallet for payment. The POS Pay call accepts an alphanumeric payment code (usually obtained by the merchant by scanning a barcode or QR code from the consumer’s payment app), that authorizes a transaction with corresponding payment providers. There is no need to specify which payment provider, the numeric payment code embeds this information automatically. With this call, there is an opportunity to send in a unique reference ID that is meaningful to the merchant. In the cases where split tender is supported in the same reference ID, there is opportunity to append the reference ID with additional characters in order to link it back to the one sale ID in the merchant’s POS.
Returns: Returns result of the transaction i.e. success or fail.
Attributes
End Point
Request
Response
POS show QR
The POS Show QR API accepts a request from the merchant to generate a payment QR code. The consumer use the supported wallet app to scan the QR code to complete the payment.
Returns: Returns result of the transaction i.e. success or fail.
Attributes
End Point
Request
Response
POS inquire
The POS Inquire API sends a transaction ID and returns the status and details of the transaction.
In many wallet POS payments, consumers may be prompted to authorize the transaction by entering the password or through biometrics after their payment codes are scanned by POS. This is to ensure the payments are indeed authorized by the account holders in order to reduce fraud and chargeback risks. In this scenario, the POS Inquire API will return “09” as code, to indicate that this transaction is in a pending state while the consumer authorizes the transaction. The POS needs to inquire for the status periodically in order to get the finalized status of the transaction
Returns: Returns result of the transaction i.e. success or fail.
Attributes
End Point
Request
Response
POS refund
The POS refund API uses a transaction_id or transaction_reference with the desired refund amount (less than or equal to the original purchase) and authorizes a refund. A paid transaction can be refunded as a whole, or as multiple partial refunds.
For the purposes of this request, a request can be made using the transaction_ID that was generated by Citcon at the time of the POS Pay API request, or alternatively using the transaction_reference that was provided by the merchant POS.
Returns: Returns result of the refund request i.e. success or fail.
Note: This API allows our merchants to make full or partial refunds on successfully paid transactions in the same currency as the original transaction. Merchants may make multiple partial refunds on an original transaction. However, the total refund(s) amount cannot exceed the amount of the original transaction. Refunds are available anytime but there are considerations.
Merchants must have funds in open balance in order to process a refund. Refunds attempted without enough funds in open balance will result in a failure.
Open Balance is reseted at the beginning of the day.
Your Citcon account holds funds from transactions settled based on settlement timing of each payment method. Successfully charged transactions are added and refunds are deducted from your account.
Merchants may apply for an exemption when there’s insufficient funds in your Citcon account to refund by submitting a request through support@citcon-inc.com. Merchants may also apply to support@citcon-inc.com to enable refunds within the Citcon Dashboard. Merchants may also submit to support@citcon-inc.com requesting Citcon enable refunds even when their Citcon account balance has insufficient funds.
Same-day refund transactions tend to be more successful, because if you sold something for $1000, you then have $1000 of cash in open balance. Therefore, if someone comes and asks for a $350 refund, you have enough cash to refund. However if that same person wants a $1100 refund, that would not work as you’re still missing $100. Point being the funds from the original transaction are still in your Citcon account therefore you have sufficient funds to perform the refund.
Refunds submitted on subsequent days may fail due to insufficient funds in your Citcon account. For example When you start your day, you have zero amount in open balance. If a customer comes and asks for a refund, you have not enough cash to give, therefore a refund cannot happen.
Attributes
End Point
Request
Response
POS cancel
Returns: Returns result of the cancellation request i.e. success or fail.
Attributes
End Point
Request
Response
POS error code
This document lists the error codes that the clients might encounter when calling the POS api.
The domain name of the sites are listed on the right.
End Point
POS initialize
The initialize API returns detailed merchant information for a POS to initialize.
error_code | code | error_message | |
---|---|---|---|
OCCUPIED_TERMINAL_CODE | I0 | Token was occupied (C-I0) Contact service provider |
|
INVALID_TERMINAL_CODE | I2 | Invalid Terminal Code (C-I2) Retry with correct terminal code |
End Point
POS pay
The pay API accepts an alphanumeric payment code (usually obtained by scanning a barcode or QR code from payment apps), authorizes a transaction with corresponding payment providers. There is no need to specify which payment provider. The information is embedded in the numeric payment code.
error_code | code | error_message | |
---|---|---|---|
INVALID_SIGNATURE | I1 | Token Certification Failed(C-I1) Contact service provider |
|
CURRENCY_NOT_MATCH | C5 | Invalid Currency (C-C5) Check POS configuration | |
UNKNOW_ALL | ZZ | Payment Failed (C-ZZ) Retry the transaction. |
|
INVALID_TERMINAL_CODE | I2 | Invalid Terminal Code (C-I2) Retry with correct terminal code |
|
SECOND_CHARGE_IN_ONE_SECOND | C4 | Payment Failed (C-4) Retry after 10 seconds |
|
UNKNOWN | 99 | System Configuration Error (A-99) Retry the transaction |
|
WAIT_BUYER_PAY | 09 | Wait for Customer Action (A-09) |
End Point
POS show QR
The Show QR API allows the requestor to generate a Alipay/WeChat Pay QR code and to show it on the merchant side, then consumer scans the QR code to complete the payment.
error_code | code | error_message | |
---|---|---|---|
INVALID_SIGNATURE | I1 | Token Certification Failed(C-I1) Contact service provider | |
UNKNOW_ALL | ZZ | Payment Failed (C-ZZ) Retry the transaction. | |
INVALID_TERMINAL_CODE | I2 | Invalid Terminal Code (C-I2) Retry with correct terminal code |
End Point
POS inquire
The inquire API takes a transaction ID, then returns status and details of the transaction.
error_code | code | error_message | |
---|---|---|---|
INVALID_SIGNATURE | I1 | Token Certification Failed(C-I1) Contact service provider | |
INVALID_TRANSACTIONID2 | 15 | Transaction ID Error (W-15) Please check the transaction ID |
|
INVALID_TERMINAL_CODE | I2 | Invalid Terminal Code (C-I2) Retry with correct terminal code |
End Point
POS refund
The refund API takes a transaction_id or transaction_reference, and desired refund amount, authorizes a refund. A paid transaction can be refunded as a whole, or as multiple partial refunds
error_code | code | error_message | |
---|---|---|---|
INVALID_SIGNATURE | I1 | Token Certification Failed(C-I1) Contact service provider | |
CURRENCY_NOT_MATCH | C5 | Invalid Currency (C-C5) Check POS configuration |
|
INVALID_TRANSACTIONID | I2 | Transaction ID Error (W-12) Check the transaction ID for refund |
|
DUPLICATED_TRANX | A5 | Refund failed(C-A5) Identify duplicated transactions |
|
TRANS_CANNOT_CANCEL_REF2 | E7 | More Than One Transaction Identified (C-E7) Please use transaction_id To initiate request |
|
TRANS_NOT_FOUND | 12 | Original Transaction Not Found (A-12) Retry the transaction | |
TRANS_CANNOT_CANCEL_REF1 | E6 | Invalid Transaction Reference ID (C-E6) Check the cancellation request |
|
UN_AUTHORIZED_REFUND_TERMINAL | A8 | Refund Failed (C-A8) Retry with authorized terminal |
|
UN_SUPPORT_O2O_MERCHANT | A9 | Refund Failed (C-A9) Not support o2o merchant |
|
UN_SUPPORT_POSQR_PAYMENT | A10 | Refund Failed (C-A10) Not support POS_QR transaction |
|
REFUND_IN_HOLD_TIME | A7 | Refund Failed (C-A7) Retry after hold time |
|
UNKNOW_ALL | ZZ | Payment Failed (C-ZZ) Retry the transaction. |
|
ORIGINAL_TRANSACTION_NOT_FOUND | A2 | Order Status Error (C-A2) Check Order Status |
|
REFUND_AMOUNT_EXCEED_ORIGINAL | A1 | Over Allowed Amount (C-A1) Retry with correct refund amount |
|
CANNOT_CREATE_REFUND | A3 | Refund Failed (C-A3) Check order status. |
End Point
POS cancel
The cancel API is used to cancel an Alipay or a WeChat Pay transaction. If the amount is unpaid yet, the transaction will be closed. If the amount is paid, the transaction will be refunded. Transactions created within 15 seconds or transactions reconciled cannot be canceled.
error_code | code | error_message | |
---|---|---|---|
INVALID_SIGNATURE | I1 | Token Certification Failed(C-I1) Contact service provider | |
INVALID_TRANSACTIONID | I2 | Transaction ID Error (W-12) Check the transaction ID for refund | |
DUPLICATED_TRANX | A5 | Refund failed(C-A5) Identify duplicated transactions |
|
TRANS_CANNOT_CANCEL_REF2 | E7 | More Than One Transaction Identified (C-E7) Please use transaction_id To initiate request | |
TRANS_NOT_FOUND | 12 | Original Transaction Not Found (A-12) Retry the transaction | |
TRANS_CANNOT_CANCEL_REF1 | E6 | Invalid Transaction Reference ID (C-E6) Check the cancellation request | |
TRANS_NOT_FOUND | 12 | Original Transaction Not Found (A-12) Retry the transaction |
|
TRANS_CANNOT_CANCEL_REF1 | E6 | Invalid Transaction Reference ID (C-E6) Check the cancellation request |
|
TRANS_CANNOT_CANCEL | E5 | Cancellation Failed (C-E5) Order payment refunded |
|
OPERATION_NOT_SUPPORT | E1 | Cancellation Failed (C-E1) Only support ALP/WXP order |
|
CANCEL_DUPLICATE | E4 | Cancellation Duplicated (C-E4) Check the cancellation request |
|
NOT_IN_CANCELLATION_WINDOW | E3 | Cancellation Failed (C-E3) Retry after 20 seconds. |
|
INVALID_TERMINAL_CODE | I2 | Invalid Terminal Code (C-I2) Retry with correct terminal code | UNKNOW_ALL | ZZ | Payment Failed (C-ZZ) Retry the transaction. |
End Point
ALIPAY ERROR CODE
code | error_message | ||
---|---|---|---|
01 | Payment Failed (A-01) Retry the transaction |
||
02 | Invalid Payment Code (A-02) Retry with payment code |
||
05 | Payment Failed (A-05) Retry the transaction |
||
09 | Wait for Customer Action (A-09) | ||
12 | Original Transaction Not Found (A-12) Retry the transaction |
||
13 | System Error (A-13) Retry the transaction |
||
14 | Connection Failed (A-14) Retry the transaction |
||
19 | Duplicate Refund Order (A-19) Submit a new refund order |
||
31 | Payment Failed (A-31) Contact your service provider |
||
51 | Payment Failed (A-51) Retry the transaction |
||
52 | Merchant Configuration Error (A-52) Contact your service provider |
||
53 | Account Error (A-53) Retry the transaction |
||
54 | Account Error (A-54) Retry the transaction |
||
55 | Account Error (A-55) Retry the transaction |
||
56 | Transaction Error (A-56) Contact your service provider |
||
57 | Balance Disabled (A-57) Customer to enable Balance and retry |
||
58 | Over Allowed Amount (A-58) Enter a lower amount and retry |
||
59 | Over Allowed Amount (A-59) Ask for another form of payment |
||
60 | Over Allowed Amount (A-60) Ask for another form of payment |
||
61 | Over Allowed Amount (A-61) Ask for another form of payment |
||
62 | Insufficient Funds (A-62) Change a payment method in Alipay |
||
63 | Insufficient Funds (A-63) Change a payment method in Alipay |
||
64 | Incorrect Refund Amount (A-64) Check refund amount and retry |
||
91 | System Configuration Error (A-91) Retry the transaction |
||
96 | System Configuration Error (A-96) Retry the transaction |
||
99 | System Configuration Error (A-99) Retry the transaction |
||
H1 | Transaction Closed (A-H1) Check refund information |
||
H3 | Payment Failed (A-H3) Retry the transaction |
||
H6 | Payment Failed (A-H6) Retry the transaction |
||
H7 | Product Description Error (A-H7) Ask for another form of payment and contact your service provider |
||
H8 | Payment Failed (A-H8) Retry the transaction |
||
H9 | Request Declined (A-H9) Transaction can only be closed after customer completes payment |
||
R1 | Payment Failed (A-R1) Retry the transaction |
||
R2 | Payment Failed (A-R2) Retry the transaction |
||
R3 | Payment Failed (A-R3) Retry the transaction |
||
R4 | Payment Failed (A-R4) Retry the transaction |
||
R7 | Payment QR Code Error (A-R7) Customer to refresh payment QR and retry |
||
R8 | Payment Failed (A-R8) Retry the transaction |
||
R9 | Payment Failed (A-R9) Retry the transaction |
||
S1 | Payment failed. Please contact Citcon (S1) | ||
S2 | App Version Error (A-S2) Update Alipay App |
WECHAT ERROR CODE
code | error_message | ||
---|---|---|---|
01 | Card Error (W-01) Change payment method in WeChat Pay |
||
09 | Wait for Customer Action (09) | ||
10 | System Error (W-10) Retry the transaction |
||
11 | Card Timed Out (W-11) Change payment method in WeChat Pay |
||
12 | Transaction ID Error (W-12) Check the transaction ID for refund |
||
13 | QR Code Expired (W-13) Refresh payment QR |
||
14 | QR Code Invalid (W-14) Retry with payment QR |
||
15 | Transaction ID Error (W-15) Please check the transaction ID |
||
25 | Order Not Exist (W-25) Check transaction ID |
||
38 | Duplicate Order (W-38) Submit a new order |
||
39 | Merchant Configuration Error (W-39) Contact your service provider |
||
40 | System Configuration Error (W-40) Contact your service provider |
||
41 | Merchant QR Configuration Error (W-41) Contact your service provider |
||
42 | XML Error (W-42) Retry the transaction |
||
43 | Require POST Method (W-43) Retry the transaction |
||
44 | Sign Error (W-44) Retry the transaction |
||
45 | Lack Parameter (W-45) Retry the transaction |
||
46 | Not UTF8 (W-46) Retry the transaction |
||
47 | NO APPID (W-47) Retry the transaction |
||
48 | NO MCHD (W-48) Retry the transaction |
||
49 | APPID MCHD Mismatch (W-49) Retry the transaction |
||
63 | Insufficient Fund (W-63) Change payment method in WeChat Pay |
||
91 | Duplicate Order (W-91) The order has been paid |
||
H3 | Order Closed (W-H3) Submit a new order |
||
H4 | Order Cancelled (W-H4) Retry the transaction | ||
R6 | Payment Failed(W-R6) Check account status and retry |
||
R7 | Account Error (W-R7) Check account status and retry |