Credit Card Processing
Server To Server
To process a transaction using txprocess, send parameters with HTTP/ HTTPS POST (query string format) to https://office.paywiser.com/api/v1/index.php/{sid}/singletx

Query Parameters
Parameter | Required | Description |
---|---|---|
sid | Yes | Site id (unique identifier for the web site) |
tid | No | Tracking id (must be unique for each transaction) |
postback_url | Yes | The URL of the page used to recieve the TxHandler postback. The response can be read from $_POST array. |
redirect_url | No | Only required for 3D flow |
hash | Yes | md5 hash of strings concatenation from sid + timestamp + amounttotal + currency + rcode e.g. (in PHP): md5(‘22’.‘1234568995265421’.‘17.00’.‘CNY’.‘222b6c’) REMARK : amounttotal = (item_amount_unit * item_quantity ) + amount_shipping + amount_tax – amount_coupon |
timestamp | Yes | Format : hhmmss |
card_type | Yes | • allcard |
card_no | Yes | Credit card number, In case of double acquiring payment it will be the transaction reference from the authorize transaction and no need for the rest card info. |
cart_exp_year | condition | 4-digityear expiration of the credit card.(e.g. 2020) |
card_exp_month | condition | 2-digitmonth expiration of the credit card. (eg. 05 – May) |
card_ccv | condition | CVV/CVC2 credit card verification code |
firstname | Yes | Frist name of the customer |
lastname | Yes | Last name of the customer |
phone | Yes | 10 to 14 numeric digits |
Yes | Customer’s email address | |
mobile | Yes | Mobile number |
address | Yes | Customer address |
suburb_city | Yes | Customer suburb or city |
state | Yes | Customer state, 2 digit code for US/Canada |
postcode | Yes | Customer postcode/zipcode |
country | Yes | Customer country, ISO 3166 2 digit code |
uip | Yes | Customer’s IPaddress. |
currency | Yes | Transaction currency[currency in which the gateway is setup], ISO 3 letter code ie : USD |
amount_shipping | Yes | Transaction shipping amount. 0.00 if nothing |
amount_coupon | Yes | Coupon amount. 0.00 if nothing |
amount_tax | Yes | Transaction shipping amount. 0.00 if nothing |
item_quantity[] | Yes | Quantity of each cart item |
item_name[] | Yes | Article names for each cart item |
item_no[] | Yes | Article numbers for each cart item |
item_desc[] | Yes | Descriptions for each cart item |
item_amount_unit[] | Yes | Price per unit for each cart item in two decimal place |
ref1 | No | Merchant reference field |
ref2 | No | Merchant reference field |
ref3 | No | Merchant reference field |
ref4 | No | Merchant reference field |
tx_action | No | Value : “PAYMENT” |
addinfo | No | Json string with below data:
{"browserscreenheight":"800","browserscreenwidth":"600","browsertz":"01"}
|
Instant Response
Parameter | DataType | Description |
---|---|---|
sid | String | Has the sid where transaction was processed |
status | String | OK – successful , EXC – failed , REQ – pending for 3D authentication. Only for 3D channel |
parrent_txid | String | Parent transaction id |
txid | String | The transaction ID |
tx_action | String | Default Value - PAYMENT |
amount | String | The amount processed. |
currency | String | The currency in which the transaction was processed |
comment | String | Description of the transaction |
descriptor | String | Gateway descriptor name |
error[type] | String | “WAIT3D” - Only for 3D channel |
error[msg] | String | “Awaiting 3DSecure” - Only for 3D channel |
error[info][webUrl] | String | 3Ds url – please redirect user to the url given for the 3Ds authentication. Only for 3D channel |
Postback Response
Parameter | DataType | Description |
---|---|---|
sid | String | Has the sid where transaction was processed |
status | String | Has the value “OK” for a successful transaction, or “EXC” for a failed transaction. |
parrent_txid | String | Parent transaction id |
txid | String | The transaction ID |
tx_action | String | Tx_action = PAYMENT |
amount | String | The amount processed. |
currency | String | The currency in which the transaction was processed |
comment | String | Response from the gateway |
descriptor | String | Gateway descriptor name |
tid | String | From the original transaction |
error | String | If an error has occurred, then the status value will equal “EXC” and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. |
error_type | String | “WAIT3D” - Only for 3D channel |
error_msg | String | The error message |
error_sys | String | The system that caused the error (client or server) |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | error_code |
vrfy | String | This is a sha 256 hash so the data can be verified to ensure your post back data was not modified. To generate hash with sha256 the string of sid;rcode;txid;status;amount;currency;txaction |
Redirect Solution
To process a transaction using TxHandler, post a form via HTTP POST to https://office.paywiser.com/secure/txHandler.php. During the transaction, the user will be redirected to make payment and then send back to a user defined location and the result of the transaction can be received as postback to a user defined script/page
Refund Process via API
HTTP Request
POST https://office.paywiser.com/api/v1/index.php/{ptxid}/refund
Request Parameters
Name | Required (Yes or No) | Description |
---|---|---|
ptxid | Yes | Parent transaction id |
sid | Yes | Site id (unique identifier for the web site) |
hash | Yes | md5 hash of sid+timestamp+amount+currency+rcode Example: md5('22'.'1234568995265421'.'17.00'.'CNY'.'222b6c')
|
postback_url | Yes | The URL of the page used to receive the TxHandler postback. The response can be read from the $_POST array. |
timestamp | Yes | Format: hhmmss, same value that is used to generate the hash |
currency | Yes | Refund amount currency. Example: JPY |
amount | Yes | Refund amount with 2 decimals |
tx_action | Yes | Value is REFUND |
Instant Response
Name | Data Type | Description |
---|---|---|
status | String | EXC – Refund Request failed PEND – Refund Request Pending Approval |
txid | String | The transaction ID |
error | String | If an error has occurred, then the status value will equal "EXC" and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. |
error_type | String | Error type |
error_sys | String | The system that caused the error (client or server) |
error_msg | String | Refund Submitted |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | Error code |
comment | String | Status OK - Refund Submitted Status EXC – Reason of Failure |
Instant Response
The transaction is completed when you receive the response with tx_action=REFUND. The response will be sent to the postback_url given in the post.
Name | Data Type | Description |
---|---|---|
sid | String | Has the sid where transaction was processed |
status | String | Has the value "OK" for a successful transaction, or "EXC" for a failed transaction. |
parent_txid | String | Parent transaction id |
txid | String | The transaction ID |
tx_action | String | Tx_action = REFUND |
amount | String | The amount processed |
currency | String | The currency in which the transaction was processed |
comment | String | Response from the gateway |
descriptor | String | Gateway descriptor name |
tid | String | From the original transaction |
error | String | If an error has occurred, then the status value will equal "EXC" and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. |
error_type | String | error_type |
error_sys | String | The system that caused the error (client or server) |
error_msg | String | The error message |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | error_code |
vry | String | $sid;$rcode;$txid;$status;$amount;$currency;$txaction |
Appendix A : Testing Credit Cards (Redirect solution)
VISA | MASTERCARD | Asynchronous Response | Postback Response |
---|---|---|---|
4111111111111111 | 5105105105105100 | SUCCESS | SUCCESS |
4532093145083303 | 5154246427959145 | WAIT3D | SUCCESS |
4012888888881881 | 5555555555554444 | PENDING | SUCCESS |
4917610000000000 | 5431111111111228 | FAIL | FAIL |
4444333322221111 | 5427660064241339 | WAIT3D | FAIL |
4999999999999236 | 5123459046058920 | PENDING | FAIL |
Test Cards for 3D (S2S solution)
Please use the test cards below in order to test Secure Token in test mode.
The following fields are required when performing a test transaction.
- payment_details[name] : Test Card
- payment_details[month] : 08
- payment_details[year] : 2025
Authentication success
These card numbers can be used to complete a transaction without an authentication challenge.
Card Number | Type |
---|---|
4100000000000100 | Visa |
5100000000000107 | Mastercard |
3528000000000106 | JCB |
Authentication success with second authentication
These card numbers can be used to test transactions with a password challenge via paymentinfo URL Please use 123456 to pass the second authentication.
Card Number | Type |
---|---|
4100000000005000 | Visa |
5100000000005007 | Mastercard |
3528000000005006 | JCB |
Authentication rejected
These card numbers can be used to test a rejected authentication after accessing paymentinfo URL and being redirected to return_url.
Card Number | Type |
---|---|
4100000000500000 | Visa |
5100000000500007 | Mastercard |
3528000000500006 | JCB |
Authentication failed on second authentication
These card numbers can be used to test transactions with a challenge password. Please use 111111 to simulate a failed authentication.
Card Number | Type |
---|---|
4100000000300005 | Visa |
5100000000300002 | Mastercard |
3528000000300001 | JCB |