Getting Started
Introduction#
Wowpay provides a web interface that allows integration with Merchant System which would like to accept online payment by credit/debit card, direct debit and e-Wallet and other alternate payment methods (APM).This Merchant Integration Guide provides merchants with the necessary technical information to integrate their applications (Merchant Systems) with Wowpay.The manual contains message format required between Wowpay and Merchant System for various payment transaction types, namely Payment, Query and Reversal. It is intended as a technical guide for merchant developers and system integrators who are responsible for designing or programming the respective online applications to integrate with Wowpay
Pre-requisite#
All merchants who would like to integrate with Wowpay must obtain a valid payment account from Wowpay. Upon payment account generated, Wowpay will provide credentials (merchant_code, merchant_id, username, password) to merchants to connect the APIs.
Direct API Integration#
Payment Options#
To start your online payment integration, you need to implement API calls from your server. This payment option request should be performed via Server-to-Server (webrequest) and post method.
Sending Payment Option request (Merchant System -> Wowpay)
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
merchant_code | a | 20 | y | provided by wowpay |
username | a | 20 | y | provided by wowpay |
password | a | 20 | y | provided by wowpay |
merchant_id | an | 40 | y | provided by wowpay |
currency | a | 3 | y | wowpay supports most of the major currencies |
country | an | 30 | y | country code : "ALL" |
product_code | an | 20 | y | default is "ANY". product code referring to the list of product parameter that wowpay will return in response. Refer 3.1 |
To start your online payment integration, you need to implement API calls from your server. This payment option request should be performed via Server-to-Server (webrequest) and post method.
Note
These details provided by Wowpay
{
"merchant_code": "TESTMIDCODE",
"username": "TESTMIDCODE",
"password": "TESMIDCODE",
"merchant_id": f9a27d58-1172-4f7e-8da8-dacdf7662d56,
"currency": "THB",
"country": "ALL",
"product_code": "ALL"
}
Payment Option response#
(Wowpay -> Merchant System)#
The following fields are the Payment information expected from Wowpay to Merchant System to perform an online payment transaction
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
req_datetime | AN | 50 | Y | Date & time in UTC : 2018-08-29T04:18:06.439112Z |
payment_options[0] | ||||
payment_optionid | AN | Y | GUID | |
payment_type | A | 50 | Y | CreditCard / Online Banking / Offline Payment. Other payments type available upon request. |
display_name | A | 20 | Y | You can use this to display the payment option name in your website. |
request_method | A | 10 | Y | Http / Custom method to submit the payment request. (POST) |
payment_options[0].payment_channels[0] | ||||
payment_channels[0].payment_id | ANS | 15 | Y | Based on the user's payment selection It should be send in the Payment Request. |
payment_channels[0].card_type | A | 16 | Y | Credit Card Type e.g. VISA/MASTERCARD/AMEX/JCB/DINERS *Only available as per request |
payment_channels[0].channel_code | A | 17 | Y | |
payment_channels[0].channel_name | A | 18 | Y | |
payment_channels[0].request_url | AN | 200 | Y | Payment Request should be submitted to this url for this payment option: |
payment_channels[0].channel_id | AN | Y | GUID | |
payment_channels[0].iscredntialneed | Boolen | Y | ||
payment_options[0].capture_card | N | Identify to where the card details are captured 0 – None (if non card payment) 1 – Merchant Or Wowpay page 2 – Bank / Provider page |
||
payment_options[0].display_order | N | 1 | Y | Indicate that the order information is display on merchant browser site. |
payment_options[0].isasynchornous_payment | A | 10 | Y | False - PAY NOW (creditcard,directdebit,…) True - PAY LATER (ATM payment,OvertheCounter,…) |
payment_options[0].currency | A | 3 | ||
payment_options[0].country | AN | 30 | ||
payment_options[0].method_id | AN | GUID |
Request & Response#
Sending Payment Request (Merchant System -> Wowpay)#
The following fields are the Payment information expected from Merchant System to Wowpay in order to perform an online payment transaction. These parameters must be passed using POST method.
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
is_webrq | Boolen | Y | ||
language | A | 2 | Y | ISO 639-1 language Code for wowpay Payment Info Collection Page: EN |
merchantid | AN | GUID | ||
requestid | AN | 10 | ||
customerip | AN | 20 | Y | Customer’s IP address captured by merchant system. |
merchant_rtn_url | AN | 200 | Y | Merchant system’s browser redirect URL which receives payment response from wowpay when transaction is completed (approved/declined/system error/cancelled by customer on Payment Page) |
merchant_callback_url | AN | 200 | Y | Server-to-server URL as an additional link to merchant’s website to be informed of transaction status |
merchant_website | AN | 200 | O | |
merchant_request_time | AN | 20 | Y | Must be in UTC : 2019-10-30T16:13:04 |
payment_expiry | Date | O | This field applicable specially for offline payments. ex:"2018-08-29T14:45:37.3141418+08:00" | |
user_reference | AN | O | This is used to for statement description for the customers. *Depends on the PSP | |
profiling_reference | AN | O | This is used for fraud api's profiling reference,if merchant implementd any profiling api for fraud api | |
signature | AN | Y | Please refer Signature for Direct Api Integration | |
is_recurringpayment | Boolen | By default 'false' | If merchant wants to collect recurring payment from wowpay, it should be true | |
subscription_data | For the request data details please refer Subscription.After initializing the subscriptiondata it should be serialized and encoded to base64. | |||
payment_Info | ||||
payment_info.payment_id | ANS | 15 | Y | Payment ID which is set by wowpay |
payment_info.merchant_txnid | AN | 16 | Y | Unique transaction ID/reference code assigned by merchant for each transaction (No duplicate merchant_txnid is allowed) |
payment_info.txn_amount | N | 12(2) | Y | Payment amount in 2 decimal places regardless whether the currency has decimal places or not.Please exclude “,” sign.(e.g. 1000.00 for IDR) |
payment_info.txn_currency | A | 3 | Y | wowpay supports most of the major currencies |
payment_info.is_installment | Boolen | O | Identifier for instalment entitlement: false – Not entitled for instalment true – Entitled for instalment | |
payment_info.installment_period | N | 2 | O | Number of months for the instalment |
payment_info.installment_interesttype | AN | O | The charges incur on customer or merchant | |
payment_info.custom_field1 | AN | |||
payment_info.custom_field2 | AN | |||
payment_info.capture_card | N | 1 | O | Identifier for Capturing Card: 0 – None (Not CC) 1 – Merchant Website 2 – In wowpay page 3 – Bank / Provider Page |
payment_info.card_type | AN | 50 | ||
payment_info.merchant_ref1 | ANS | 16 | O | Additional data from merchant system that will be sent back to merchant in payment response |
payment_info.merchant_ref1 | AN | 50 | O | Additional data from merchant system that will be sent back to merchant in payment response |
payment_info.merchant_ref2 | ANS | 50 | O | Additional data from merchant system that will be sent back to merchant in payment response |
payment_info.custom_field1 | AN | 50 | O | Additional data from merchant system that will be sent back to merchant in payment response |
payment_info.custom_field2 | ANS | 50 | O | Additional data from merchant system that will be sent back to merchant in payment response |
payment_info.isstore_cardinfo | Boolen | if this field is true and the customerid is exist then the card will be tokenized againts this customerid. | ||
payment_info.customer_id | AN | 50 | ||
payment_info.card_token | AN | O | Optional AN, If merchant use the saved card then merchant have to send the token for the selected card.The card_token will be returned in the payment response when the customer wants to store the card at first time | |
payment_info.ispromo_transaction | Boolen | Default is 'false' | If merchant wants to handle any specific implementation based on promo then it should be true | |
payment_info.promo_code | AN | 20 | O | if merchant need any validation or any specific logic to handle on wowpay side, then its mandatory (valid special chars _$#@-) |
payment_Info.card_info [Applicable for only for Credit Card] | ||||
card_info.cardholder_name | A | 16 | Y | Cardholder’s Name |
card_info.card_no | N | 16 | Y | Credit Card Number used for payment authorization |
card_info.cvv | N | 4 | Y | 3-4 digits Card Verification Value.Available on the back of credit card |
card_info.card_type | A | 16 | Y | VISA/MASTERCARD/AMEX/JCB/DINERS |
card_info.exp_month | N | 6 | Y | "Expiry date of credit card. Date format is MM, e.g.12 for December" |
card_info.exp_year | A | 16 | Y | "Expiry date of credit card. Date format is YYYY, e.g.2020 " |
card_info.start_month | A | 16 | O | "Date of Registering Credit Card available on the front of credit card “Member Since” Date format is MM, e.g.12 for December" |
card_info.start_year | A | 16 | O | "Date of Registering Credit Card available on the front of credit card “Member Since” Date format is YYYY, e.g.2020" |
order_info | ||||
order_info.order_desc | AN | 50 | Y | Order Description |
order_info.Item_list[0] | ||||
Item_list[0].item_id | AN | 50 | Y | "Item index: ""1""" |
Item_list[0].item_code | AN | 50 | Y | "e.g Hotel item Code: ""Hiltont001""" |
Item_list[0].item_type | N | 10 | O | e.g Hotel item Type: “3” |
Item_list[0].item_name | AN | 50 | Y | e.g Hotel item Name: “Hilton Hotel” |
Item_list[0].item_desc | AN | 50 | Y | e.g Hotel item Description: “Miami Hilton” |
Item_list[0].item_amount | N | 50 | Y | e.g Hotel item Amount: “100” |
customer_info[] | ||||
customer_info[0].first_name | AN | 50 | Y | Customer’s first name |
customer_info[0].last_name | AN | 50 | Y | Customer’s last name |
customer_info[0].full_name | AN | 100 | ||
customer_info[0].mobile | N | 20 | Y | Customer’s Contact Number |
customer_info[0].email | AN | 150 | Y | |
customer_info[0].islead_pax | AN | 50 | Y | It should be true for the lead pax |
customer_info[0].address | AN | 50 | Y | Customer’s address |
customer_info[0].city | AN | 50 | Y | "Customer’s city: ""Kuala Lumpur""" |
customer_info[0].state | AN | 100 | ||
customer_info[0].postcode | N | 50 | Y | "Customer’s postcode: ""548010""" |
customer_info[0].country | A | 10 | Y | "Customer’s country: ""MY""" |
device_info | ||||
device_info.deviceid | AN | |||
device_info.devicename | AN | |||
device_info.devicemodel | AN | |||
device_info.devicetype | AN | |||
device_info.browser | AN | |||
device_info.devicefingerprint | AN | |||
device_info.useragent | AN | 1000 | ||
device_info.acceptheader | AN | 1000 | ||
device_info.acceptlanguage | AN | 100 | ||
merchant_access | Optional , if merchant sent the PSP's credentials then they can use this element. | |||
merchant_access.provider_id | AN | |||
merchant_access.accesscode | AN | |||
merchant_access.accesskey | AN | |||
merchant_access.username | AN | |||
merchant_access.password | AN | |||
merchant_access.secretkey | AN | |||
merchant_access.param1 | AN | |||
merchant_access.param2 | AN | |||
merchant_access.param3 | AN | |||
additional_info | Optional,if merchant wants to send any custom parameters, can use this element. | |||
additional_info.field_name | AN | |||
additional_info.field_value | AN | |||
additional_info.description | AN |
Sample HTML Form in Payment Request
<form id="pay_form" action="https://<url to be provide by Wowpay>" method="post">
<input type="hidden" name="MerchantId" id="MerchantId" value='6' />
<input type="hidden" name="paymentRq" id="paymentRq" value='GzIt4pQN7JYsV2OstHwW0T6vW/=' />
<input type="hidden" name="MerchantTxnId" id="MerchantTxnId" value='Z1911aa76dcb5c9' />
<input type="hidden" name="EncValue" id="EncValue" value=bbffdbfdhjytye32361bgbu2vb==' />
</form>
Payment Response (Wowpay -> Merchant System)#
Upon payment process completion, the following fields will be returned from Wowpay to Merchant System’s (merchant_rtn_url) in order to complete an end-to-end payment process
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
txnentry_id | AN | GUID | ||
merchant_txnid | AN | 20 | Y | "Follows request e.g: ""M201254""" |
Error | ||||
Error.error_code | AN | 20 | O | "Message string containing description of the error code (if any), or the description of the response error from bank." |
Error.error_type | AN | 20 | O | "Message string containing description of the error type (if any), or the description of the response error from bank" |
Error.error_description | AN | 20 | O | "Message string containing description of the error (if any), or the description of the response error from bank." |
paymentrs_info | ||||
paymentrs_info.txn_status | AN | 20 | Y | Status of the transaction |
paymentrs_info.txn_statuscode | AN | 20 | Y | Numerical containing value of the txn_status |
paymentrs_info.txn_statusdesc | AN | 50 | ||
paymentrs_info.provider_desc | AN | 500 | ||
paymentrs_info.signature | AN | 100 | Y | Refer Signature for Direct Api. Message digest value calculated by Merchant System in hexadecimal string using SHA512 hash algorithm |
paymentrs_info.approval_code | AN | 20 | Y | This is the approval code returned from the bank or payment provider for the successful transaction |
paymentrs_info.transaction_no | AN | 20 | Y | Unique Transaction ID or Reference Code assigned by Wowpay for each of the transaction |
paymentrs_info.transaction_ref | AN | 20 | Y | Unique Transaction reference code assigned by Wowpay for each of the transaction. |
paymentrs_info.payment_method | AN | 50 | Y | |
paymentrs_info.channel_code | AN | 50 | ||
payment_info | ||||
payment_info.merchant_txnid | AN | 20 | Y | "Follows request e.g: ""M201254""" |
payment_info.txn_amount | AN | 20 | Y | "Follows request e.g: ""10.00""" |
payment_info.txn_currency | AN | 20 | Y | "Follows request e.g: ""MYR""" |
payment_info.is_installment | AN | 20 | Y | Static Value: FALSE / TRUE |
payment_info.installment_period | AN | 20 | Y | Number of months for the instalment |
payment_info.installment_interesttype | AN | O | The charges incur on customer or merchant | |
payment_info.psp_merchant_txnid | AN | 50 | O | Some cases, wowpay will sent different reference to the PSP, not the same 'merchant_txnid' and wowpay will send the reference back to merchant what wowpay sent to PSP |
payment_info.merchant_ref1 | AN | 50 | O | Same value received from merchant system in the payment request |
payment_info.merchant_ref2 | ANS | 50 | O | Same value received from merchant system in the payment request |
payment_info.custom_field1 | AN | 50 | O | Same value received from merchant system in the payment request |
payment_info.custom_field2 | ANS | 50 | O | Same value received from merchant system in the payment request |
payment_info.card_info | ||||
card_info.cardholder_name | A | 16 | O | Cardholder’s Name |
card_info.card_no | N | 16 | O | Credit Card Number used for payment authorization |
card_info.card_type | A | 16 | O | Credit Card Type e.g VISA/MASTERCARD/AMEX/JCB/DINERS *Only available as per request |
card_info.exp_month | N | 6 | O | "Expiry date of credit card. Date format is MM, e.g.12 for December" |
card_info.exp_year | N | 16 | O | "Expiry date of credit card. Date format is YYYY, e.g.2020" |
card_info.start_month | A | 16 | O | Date of Registering Credit Card available on the front of credit card “Member Since” |
card_info.start_year | A | 16 | O | "Date of Registering Credit Card available on the front of credit card “Member Since” Date format is YYYY, e.g.2020" |
payment_info.isstore_cardinfo | Boolen | |||
payment_info.customer_id | AN | 50 | ||
payment_info.card_token | AN | 50 |
Sample HTML Form for Redirect Response.
<form id="pay_form" action="http://<merchant’s redirect URL" method="post">
<input type="hidden" name="MerchantTxnId" id="MerchantTxnId" value='Z1911aa75c9' />
<input type="hidden" name="PaymentRS" id="PaymentRS" value='bHAIXg0FAcGzNXrlX9dNBsDKc3//>
<input type="hidden" name="EncValue" id="EncValue" value='OmO7NjQFykL+TF7Masqpy9UKOwXiyV==' />
</form>
Sample Server-to-Server Response
MerchantTxnId=Z1911aa76dcb5c9&PaymentRS=SJ02fvok678lXG1H%2BDPPP39jr5jYTMY2RNvAK7gCscsdxjNw11QJtwfEEIVMjfimudoxmEM8OtjZDEAELlQmpJ3ECAPsmkiOKQZAY%2Fn2oBgNsejHDuO6FdgEkxzPiSIWYKthbsygn0%2FyPsmDxgbwbfnsEUh0M3Na5udr5u6GCPuF3ELw5y8Z%2BtdEek5BW2pJTNFRNoQya9f42rT1DCqKmVcKO0t1v0amXf727SUtEkdfKy06J7edIrBnCNeJYjCvXc4eBqBfcbXXn0V0CUOc06wjXHO1gzSCQ423uFWNNIFS8qYMp9W%2BXxUrV1DBo5McLrMmF3cu941FpkTE7aHpwYz83jIo28mUwGoABQhLDHqzUhyBAa986AwbQ0FiLoL5h0y1MSxrYWWXU5NbDCkW1MdMmHmcIbZBvPmByihaBO2O6LpW35oY%2FzM0ufFSJMWYORDLmdhOZ6J7KVeIdqce1JX69LUX%2F14N%2BGFcosez%2F51trEcdmdBYzUiAd%2Fx%2BUMJm6R&EncValue=Rnz4YCVeWCtCgJOZAjdFD2ux4qfyHxyH7zyRiwSP3VefrzoPBi6NddFSqEBEs4mU2Qw%2Bi57XphykSlkJM8tme8aBFPiqbFuGt9mOqQBezN8AauXtEBniPR%2F79u2mq5pHm0QM9HurtJoTNanlwdva3Gn3l%2FcZM88mTugxdhiBwIAWobFKztdZ4fm0%2FlGPnqyGMx5v%2BIoDHxrVbwWSKPO53GnuGorsbUmdPCHNBGzUqn2dofP1YlKaARHQYruLIxJdMkeEOfrc29ftSXKTGEsbjf8vzkajjR27zY%2B8QEu3YxPLc4xcmByLh4YeWkMLL4lJiWuko3LnCJMtxBCgYhyH%2Bg%3D%3D
Hosted Integration#
Hosted Payment Request#
Payment request (Merchant System -> Payment Gateway)
The following fields are the Payment information expected from Merchant System to Payment Gateway to perform an online payment transaction with hosted payment page. These parameters must be passed using Http POST method via browser.
No. | Field | DataType | MaxLength | Required | Description |
---|---|---|---|---|---|
1 | orderref | AN | 6-15 | Y | Order Referenced generated by merchant system. It should be unique for each request. Min 6 Max 15 chars |
2 | firstname | A | 30 | Y | Customer’s FirstName |
3 | lastname | A | 30 | Y | Customer’s LastName |
4 | N | 150 | Y | Customer’s Email | |
5 | mobileno | AN | 15 | Y | Customer’s MobileNo. Ex: +6012345680 |
6 | amount | N | - | Y | Transaction amount ex: 100.00 |
7 | currency | A | 3 | Y | Ex: MYR,USD… |
8 | description | AN | 100 | Y | Ex: Hotel Booking |
9 | signature | AN | 500 | Y | Refer: Signature for Hosted Payment |
10 | merchant_id | AN | 40 | Y | It will be provided by wowpay |
11 | returnurl | AN | - | Y | Payment response will be returned to merchant system with Http Post via browser |
12 | notifyurl | AN | - | Y | Payment response will be returned to merchant system with Http Post via server-to-server |
13 | language | AN | 5 | O | Ex: en-US |
14 | ordersummary | AN | - | O | |
15 | statementdescription | AN | 25 | C | Merchant can send the text, to appear on the customer’s statement. It not applicable for all channels and all cases |
16 | address | AN | 50 | O | |
17 | postalcode | AN | 10 | O | |
18 | city | AN | 50 | O | |
19 | customerid | AN | 50 | O | If you have a customer profile for your website then pass the CUSTOMERID here |
20 | isstorecard | Boolen | O | If ISSTORECARD is true and CUSTOMERID is available, and the customer uses credit card, then in wowpay page user can see a option to save the card for his future transaction. If he chooses to save card, the card will be tokenized. | |
21 | ispromotransaction | Boolen | O | It should be true, If merchant wants to process the payment only whichever payment providers enabled with PROMO.If this field is true then promocode and product_type are mandatory | |
22 | promocode | AN | 20 | O | If merchant needs any validation or any specific logic to handle on wowpay side, then its mandatory (valid special chars _$#@-) |
23 | product_type | A | 15 | O | If merchant needs to show the payment options based on the product type, then its mandatory. By default its considered as “ANY” |
24 | isrecurringpayment | Boolen | C | ||
25 | subscriptiondata | For the request data details please refer Subscription.After initializing the subscriptiondata it should be serialized and encoded to base64. |
Hosted Payment response#
Payment Response (Payment Gateway -> Merchant System)
The following fields are the Payment information expected from Payment Gateway to Merchant System to confirm the transaction based on the payment status
No. | Field | DataType | Length | Req | Description |
---|---|---|---|---|---|
1 | acknowledgement_url | AN | 150 | O | This is Wowpay’s url. If the url is available then merchant can call this url (http GET) to confirm whether they received the response |
2 | orderref | AN | 6-15 | Y | Order Referenced generated by merchant system.(same OrderRef received in the request) |
3 | amount | N | - | Y | Transaction amount ex: 100.00 |
4 | currency | A | 3 | Y | Ex: MYR,USD… |
5 | approval_code | AN | - | O | It ll be present if the transaction is Success |
6 | payment_reference1 | AN | - | O | Additional reference of payment |
7 | payment_reference2 | AN | - | O | |
8 | payment_reference3 | AN | O | Additional reference of payment | |
9 | payment_status | AN | 25 | Y | Wowpay Reference no. Merchant can use this to further actions like to check status, refund,void |
10 | payment_statuscode | N | 2 | Y | Refer: Section Transaction Status |
11 | payment_type | AN | 50 | O | Payment method used for this transaction |
12 | payment_channel | AN | 50 | O | Payment channel used for this transaction |
13 | merchant_id | AN | 40 | Y | Same merchant_id the one received in the request |
14 | payment_description | AN | - | Y | Reason if the payment is fail or success |
15 | card_number | AN | - | Y | If its credit/debit cards then partial cardno will be returned. 411111xxxxxx1111 |
16 | signature | AN | 500 | O | Refer Signature for Hosted Payment |
Payment Actions (Void/Capture/Refund)#
Payment action allows the merchant to perform Void / Capture / Refund against existing successful transactions. Json data should be submitted using Http POST via server-to-server
The payment action api need a header authentication for each request
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
merchant_txnid | AN | 6-15 | Y | This is value “PAYMENT_REFERENCE3” returned to merchant in the payment response.Its mandatory for Void/Refund/Capture |
order_ref | AN | 6-15 | O | For inquiry, merchant can use order_ref (the one used in payment request). Or merchant_txnid (Wowpay reference) |
txn_amount | A | 30 | Y | Amount needs to be refunded /voided/captured. It should not exceed original transaction amount. For Inquiry, amount is optional |
request_type | A | 30 | Y | Request Type must be any one of the following 1.Void 2.Refund 3.Capture Inquiry |
signature | N | 500 | Y | Refer Signature for Payment Action |
Please refer the below section to generate and add header
Header Name: BasicAuth, Token: It will be provided by Wowpay
For sanbox testing the below token can be used
c3BYK1MrZTMwcC9hbEk0TGI3bG16c21zKzZ3ZUxWV3A
Generate Header Value: Input = To UpperCase (request_type + merchant_txnid + Token) Headervalue = Base64Encode(Input)
Input: REFUNDSIM0000000130C3BYK1MRZTMWCC9HBEK0TGI3BG16C21ZKZZ3ZUXWV3A=
Output: UkVGVU5EU0lNMDAwMDAwMDEzMEMzQllLMU1SWlRNV0NDOUhCRUswVEdJM0JHMTZDMjFaS 1paM1pVWFdWM0E9
var authValue = new AuthenticationHeaderValue(HeaderName, Headervalue);
HttpClient oclient = new HttpClient()
{
DefaultRequestHeaders = { Authorization = authValue }S
};
public static string Base64Encode(string str)
{
byte[] b = new byte[str.Length];
for (int i = 0; i < str.Length; i++)
{
b[i] = Convert.ToByte(str[i]); };
return Convert.ToBase64String(b);
}
}
Response
Field | Datatype | Length | Req | Description |
---|---|---|---|---|
merchant_txnid | AN | 6-15 | Y | This is value “PAYMENT_REFERENCE3” returned to merchant in the payment response. |
txn_amount | N | Y | Amount needs to be refunded /voided/captured. It should not exceed original transaction amount | |
request_type | A | 30 | Y | Request Type must be any one of the following Void/Refund/Capture/Inquiry |
signature | AN | 500 | Y | Refer Signature for Payment Action |
txn_status | A | 25 | Y | |
txn_statuscode | N | 2 | O | |
provider_desc | AN | O | ||
approval_code | 50 | O | ||
transaction_no | 50 | O | ||
transaction_ref1 | 50 | O | ||
txn_currency | A | 3 | O | Available in inquiry response |
masked_cardno | AN | 16-19 | O | Available in inquiry response |
payment_method | AN | 50 | O | Available in inquiry response |
channel_code | AN | 50 | O | |
txn_entryId | AN | 36 | O |
Subscription#
Subscription refers to a payment model where a customer pays a recurring fee to access a product or service for a specific period. The payment can be made on a daily, weekly, monthly, quarterly,or yearly basis, depending on the terms of the subscription.
Subscriptions are often used for digital products and services, such as software, online courses, music and video streaming, and news and magazine subscriptions. In recent years, subscription models have also become popular in industries such as e-commerce and retail, where customers can sign up for regular deliveries of products they use regularly, such as beauty or household items.
Subscriptions offer benefits to both customers and businesses. For customers, subscriptions provide access to products and services without the need for a large upfront payment. For businesses, subscriptions provide a stable source of revenue and the ability to forecast future earnings, which can help with planning and growth.
Subscription Request#
No | Field | DataType | Length | Required | Description |
---|---|---|---|---|---|
1 | subscription_code | AN | 20 | C | Code of the subscription or plan, later the merchant can query the subscription details to view/ update / cancel via the api |
2 | customer_id | AN | C | Customer profile id | |
3 | description | AN | |||
4 | charge_type | A | C | Autodebit - The payment will be charged automatically by the system for each 'PaymentDate' from customers card which the customer saved his card for his first payment. Paymentlink - The payment will be charged through link sent to customer email |
|
5 | frequency_type | A | C | Daily / Weekly / Monthly / Yearly (optional because mnerchant define the recurring payments with payment date in the subscription payment list.) | |
6 | subscription_period | N | O | This to say for how many days/months/years the recurring payment should be processed. It is mandatory if recurring payment list is empty |
|
7 | total_amount | N | Total subscription amount, it should be equal to the sum of the SubscriptionPayments | ||
8 | currency | A | O | optional, if merchant define this in the request,it should be same as txn_currency. | |
9 | days_before_tocharge | N | O | Its optional for the chargetype autodebit. Its mandatory for the paymentlink. Based on this the paymentlink will be sent out to the customers before the paymentdate.If this is value is available for autodebit, then the customer will be charged based on this . ex: if DaysBeforeToCharge is 1 day |
|
recurring_payments[] | List of payment details for subsequent payment dues based on the frequencytype. | ||||
10 | recurring_payments[0].payment_code | A | It should be unique for each payments in the list. It will be used as a reference to the customer in the paymentlink. | ||
11 | recurring_payments[0].amount | N | C | ||
12 | recurring_payments[0].payment_date | Date | C | Predefined date for the next payment and its defined by the merchant. | |
13 | recurring_payments[0].description | AN | Short description about the subscription. Ex: Second month due for this subscription. |
Retrive Subscription#
Existing subscription details can be fetched using this api.
Request
Field | DataType | Length | Req | Description |
---|---|---|---|---|
merchant_id | AN | C | GUID given by wowpay to merchant | |
customer_id | AN | C | Customer profile id | |
subscription_code | AN | O | It is mandatory while using Upgrade/Cancel api. | |
subscription_status | A | O | Active,Cancelled,Upgraded,Completed | |
duedate_from | Date | O | ||
duedate_to | Date | O | ||
createddate_from | Date | O | ||
createddate_to | Date | O | ||
list_count | N | O | Default to 50 |
Response
{
"responsecode": "success",
"result": [{
"subscription_code": "Test100423133806",
"merchant_id": "e81932f2-71b7-4e78-96c8-f8cc42f2d6b7",
"customer_id": "SureshNewToken4",
"description": "test",
"charge_type": 1,
"frequency_type": 2,
"subscription_period": 3,
"total_amount": 0.00,
"currency": "USD",
"last_paymentdate": "0001-01-01T00:00:00",
"next_paymentdate": "0001-01-01T00:00:00",
"no_of_completedpayments": 0,
"days_before_tocharge": 2,
"subscription_status": 1,
"recurring_payments": [{
"payment_code": "Test100423133806-1",
"amount": 50.00,
"payment_date": "2023-04-10T13:38:06.214875",
"payment_status": 14,
"id": "f584ac41-b4cd-4c62-a33e-ad5fb2318235",
"created_date": "2023-04-10T08:22:50.2901673Z",
"is_emailsent":"true"
}, {
"payment_code": "Test100423133806-2",
"amount": 50.00,
"payment_date": "2023-04-17T13:38:06.214879",
"payment_status": 25,
"id": "ae2c983b-8907-45dd-b3b4-f8d34f70549a",
"created_date": "2023-04-10T08:22:50.2911283Z",
"is_emailsent":"true"
}, {
"payment_code": "Test100423133806-3",
"amount": 50.00,
"payment_date": "2023-05-24T13:38:06.214882",
"payment_status": 25,
"id": "4ece54c5-434e-45ce-b909-d2a077bacdda",
"created_date": "2023-04-10T08:22:50.2911439Z",
"is_emailsent":"true"
}
],
"id": "6b3be4c8-4f39-4697-9f3e-3b9ab0554eda",
"created_date": "2023-04-10T08:10:20.132724"
}, {
"subscription_code": "Test100423134046",
"merchant_id": "e81932f2-71b7-4e78-96c8-f8cc42f2d6b7",
"customer_id": "SureshNewToken4",
"description": "test",
"charge_type": 2,
"frequency_type": 2,
"subscription_period": 3,
"total_amount": 0.00,
"currency": "USD",
"last_paymentdate": "0001-01-01T00:00:00",
"next_paymentdate": "0001-01-01T00:00:00",
"no_of_completedpayments": 0,
"days_before_tocharge": 2,
"subscription_status": 1,
"recurring_payments": [{
"payment_code": "Test100423134046-1",
"amount": 50.00,
"payment_date": "2023-04-10T13:40:46.264831",
"payment_status": 25,
"id": "727e3812-64c9-4934-bece-b2faf0690737",
"created_date": "2023-04-10T08:22:50.2940985Z",
"is_emailsent":"true"
}, {
"payment_code": "Test100423134046-2",
"amount": 50.00,
"payment_date": "2023-04-17T13:40:46.264834",
"payment_status": 25,
"id": "cb2a00f3-6d3b-45da-b073-9d4c9e7dde6e",
"created_date": "2023-04-10T08:22:50.294103Z",
"is_emailsent":"true"
}, {
"payment_code": "Test100423134046-3",
"amount": 50.00,
"payment_date": "2023-05-21T13:40:46.264836",
"payment_status": 25,
"id": "cf6ee2f0-5cfb-4d95-aec6-4f278618054e",
"created_date": "2023-04-10T08:22:50.2941045Z",
"is_emailsent":"true"
}
],
"id": "2c0afe7c-7743-4910-b3ee-31ae924a55f5",
"created_date": "2023-04-10T08:12:00.615115"
}
]
}
Upgrade Subscription#
Request
No | Field | DataType | Length | Required | Description |
---|---|---|---|---|---|
1 | subscription_code | AN | 20 | C | Code of the subscription or plan, later the merchant can query the subscription details to view/ update / cancel via the api |
2 | merchant_id | AN | 200 | C | GUID given by wowpay to merchant |
3 | customer_id | AN | C | Customer profile id | |
4 | description | AN | |||
5 | charge_type | A | C | Autodebit - The payment will be charged automatically by the system for each 'PaymentDate' from customers card which the customer saved his card for his first payment. Paymentlink - The payment will be charged through link sent to customer email | |
6 | frequency_type | A | C | Daily / Weekly / Monthly / Yearly (optional because mnerchant define the recurring payments with payment date in the subscription payment list.) | |
7 | subscription_period | N | O | ||
8 | total_amount | N | Total subscription amount, it should be equal to the sum of the SubscriptionPayments | ||
9 | currency | A | O | optional, if merchant define this in the request,it should be same as txn_currency. | |
10 | days_before_tocharge | N | O | Its optional for the chargetype autodebit. Its mandatory for the paymentlink. Based on this the paymentlink will be sent out to the customers before the paymentdate.If this is value is available for autodebit, then the customer will be charged based on this . ex: if DaysBeforeToCharge is 1 day | |
11 | subscription_status | N | O | Cancelled - To cancel the subscription Upgraded - To upgrade the subscription Mandatory while using upgrade/cancel api | |
12 | comments | AN | O | Mandatory while using upgrade/cancel api | |
13 | recurring_payments[] | List of payment details for subsequent payment dues based on the frequencytype. | |||
14 | recurring_payments[0].payment_code | A | It should be unique for each payments in the list. It will be used as a reference to the customer in the paymentlink. | ||
15 | recurring_payments[0].amount | N | C | ||
16 | recurring_payments[0].payment_date | Date | C | Predefined date for the next payment and its defined by the merchant. | |
17 | recurring_payments[0].description | AN | Short description about the subscription. Ex: Second month due for this subscription. |
Response
{
"responsecode": "success",
"message": "subscription is upgraded sucessfully."
}
Cancel Subscription#
Request
Field | DataType | Length | Req | Description |
---|---|---|---|---|
id | AN | Unique guid generated by wowpay for the subscription.It is mandatory while using upgrade/cancel api | ||
merchant_id | AN | C | Mandatory while using upgrade/cancel api | |
customer_id | AN | C | Customer ProfileId | |
subscription_status | A | Cancelled - To cancel the subscription Upgraded - To upgrade the subscription |
||
comments | A | It is mandatory while using Upgrade/Cancel api. |
Response
{
"responsecode": "success",
"message": "subscription is cancelled sucessfully."
}
Note: Expected reponse codes are error and success.
error : The operation is considered as failed.
success : The operation is considered as success
Signature#
A signature (or simply hash), also called a message digest, is a number generated from a text string. The hash is substantially smaller than the text string itself and is generated by a formula or hash algorithm in such a way that it is extremely unlikely that some other texts will produce the same hash value. For online payment processing, hashing plays an important role to ensure the transmitted request and response messages have not been tampered with, in order to achieve data integrity. For transaction request, Merchant System is required to use SHA512 hash algorithm to generate a hash value from a combination of certain transaction fields, and then includes the value in signature field before sending the request to Wowpay which will then generate a signature value based on the same method and then verify these two hash values. If both signatures matched, Wowpay will further process the payment request or else it will discard the request message and will treat it as an invalid message.
Signature for Direct Api Integration#
Payment request’s signature should be generated based on the following fields
Payment response’s signature should be generated based on the following fields
Signature = ToUpperCase(txn_status + txn_amount.Tostring("#0.00”)+ merchant_txnid + txn_currency + approval_code)
Sample to generate signature
public static string CreateSha512Hash(string rawData)
{
string hashkey = "";
var objSha512 = SHA512.Create();
byte[] bytValue = Encoding.UTF8.GetBytes(rawData);
byte[] bytHash = objSha512.ComputeHash(bytValue);
hashkey = BitConverter.ToString(bytHash).Replace("-", "");
return hashkey;
}
Sample to generate random password
public static string GenerateRandomPassword(string salt=null,int bytelen=32)
{
return GetHashSha256($"#{salt}{DateTime.Now.ToString("ddMMmYYyyHHmmss")}{new Random().Next(100,1000)}", bytelen);
}
public static string GetHashSha256(string text, int length)
{
byte[] bytes = Encoding.UTF8.GetBytes(text);
SHA256Managed hashstring = new SHA256Managed();
byte[] hash = hashstring.ComputeHash(bytes);
string hashString = string.Empty;
foreach (byte x in hash)
{
hashString += string.Format("{0:x2}", x);
}
if (length > hashString.Length)
{
return hashString;
}
else
{
return hashString.Substring(0, length);
}
}
Sample to encrypt / decrypt (using Org.BouncyCastle.Crypto) random password
public static string Encrypt(string info, string publicKey)
{
if (publicKey.IsValidString())
{
publicKey = publicKey.Replace(Environment.NewLine, "\n");
byte[] bytes = Encoding.ASCII.GetBytes(info);
byte[] encBytes = RSAEncryption(bytes, ReadAsymmetricKeyParameterfromString(publicKey));
var result = Convert.ToBase64String(encBytes).Trim();
return result;
}
return null;
}
public static string Decrypt(string data, string privatekey)
{
string DecryptedPassword = string.Empty;
if (!string.IsNullOrWhiteSpace(data) && !string.IsNullOrWhiteSpace(privatekey))
{
if (Utility.IsUrlEncodedText(data))//if the text url encoded
{
data = WebUtility.UrlDecode(data);
}
//When we update the key from the keyfile to our db, we noticed the "\r\n" added
//but actually its "\n".
privatekey = privatekey.Replace(Environment.NewLine, "\n");
byte[] bytes = Convert.FromBase64String(data);
byte[] decBytes = RSADecryption(bytes, AsymmetricCipherKeyPairParameterfromString(privatekey));
DecryptedPassword = Encoding.ASCII.GetString(decBytes).Trim();
}
return DecryptedPassword;
}
Sample to encrypt / decrypt (using Org.BouncyCastle.Security) paymentRq & PaymentRs
public static string EncryptString(string info,string passwordPhase,string ivVector)
{ string _result = "";
try
{
// Get UTF8 byte array of input string for encryption
// Again, get UTF8 byte array of key for use in encryption
byte[] keyBytes = ASCIIEncoding.ASCII.GetBytes(passwordPhase);
// Initialize AES CTR (counter) mode cipher from the BouncyCastle cryptography library
IBufferedCipher cipher = CipherUtilities.GetCipher("AES/CTR/NoPadding");
byte[] inputBytes = ASCIIEncoding.ASCII.GetBytes(info);
//true is for encryption
cipher.Init(true, new ParametersWithIV(ParameterUtilities.CreateKeyParameter("AES", keyBytes), ASCIIEncoding.ASCII.GetBytes(ivVector)));
byte[] encryptedBytes = cipher.DoFinal(inputBytes);
_result = Convert.ToBase64String(encryptedBytes);
}
catch (Exception err)
{
//log here and take action
}
return _result;
}
public static string DecryptString(string info, string passwordPhase, string ivVector)
{
string _result = "";
try
{
// Get UTF8 byte array of input string for encryption
// Again, get UTF8 byte array of key for use in encryption
byte[] keyBytes = ASCIIEncoding.ASCII.GetBytes(passwordPhase);
// Initialize AES CTR (counter) mode cipher from the BouncyCastle cryptography library
IBufferedCipher cipher = CipherUtilities.GetCipher("AES/CTR/NoPadding");
byte[] inputBytes = Convert.FromBase64String(info);
//true is for encryption
cipher.Init(false, new ParametersWithIV(ParameterUtilities.CreateKeyParameter("AES", keyBytes), ASCIIEncoding.ASCII.GetBytes(ivVector)));
byte[] encryptedBytes = cipher.DoFinal(inputBytes);
_result = System.Text.Encoding.ASCII.GetString(encryptedBytes);
}
catch (Exception err)
{ //log here and take action }
return _result;
Signature for Hosted Payment Integration#
Payment request’s signature should be generated based on the following fields:
Signature = To Uppercase (APIPASSWORD + ORDERREF+ AMOUNT ("#0.00”) + CURRENCY + MERCHANT_ID + RETURNURL + NOTIFYURL + CUSTOMERID)
5F5A40D40FC2EC678BB73B2A04A2606E578D35FEA2B15D7DA90C5631A08C2C9AA2CDAAC1313BAB7050F9BE0EB24ECCDD9B148A47DF11171CF2C9196E76374577
Signature = To Uppercase (PAYMENT_REFERENCE3+ PAYMENT_STATUS+ AMOUNT("#0.00”) + CURRENCY+ APIPASSWORD)
Signature:
5873702BBE78C2DDC1742C2AED8F1264A6852422CD414F7016E2EDE2A2CBE69131FE6130979F061A65EECEF5E2B727422DB41729C2D634CEB0CF827B79038A4C
Signature for Payment Actions#
Payment Action request’s signature should be generated based on the following fields:
To Uppercase (merchant_txnid+ txn_amount ("#0.00”) + request_type + APIPASSWORD)
Input String:
Signature: CB466D4B1459F4F508944C4F4E427BD1434800B027F258F28D45BF8AA4461FD1EFCC374692B84E7E354EE33384B6235846668D0D33AA3789FBB487F7E64332E5
```c#
ToUppercase (merchant_txnid+ txn_amount ("#0.00”) + txn_status + APIPASSWORD)
```
Input String:
Signature:8D36EF437F524E800E17ACC9891018C24FC8BEA1A769C7DE61962C914E74023848D1ECF8E843DC1D01F05D10FA10BF22E481F19C56E3DC89054D3AA46F973681
Sample Hosted Payment Request
<form name="PaymentReturn" method="POST" action='{HOSTED PAYMENT URL}' >
<input type="hidden" name="AMOUNT" value="11.00"/>
<input type="hidden" name="CURRENCY" value="MYR"/>
<input type="hidden" name="MERCHANT_ID" value="914f825e-2b51-4318-b0a8-22c601b5979e"/>
<input type="hidden" name="ORDERREF" value="PL220720173825485"/>
<input type="hidden" name="FIRSTNAME" value="Demo"/>
<input type="hidden" name="LASTNAME" value="Customer"/>
<input type="hidden" name="EMAIL" value="xyz@xyz.com"/>
<input type="hidden" name="MOBILENO" value="+60103103103"/>
<input type="hidden" name="SIGNATURE"
value="FAD39492A926A2E37846E67E7A7BDCA24B58E51D316F07CFC4FD8749CF6DA04E3449A60896BC3B24CF37C5CCD8
6793DA384671CB94342B37E5EB413E6FB79B54"/>
<input type="hidden" name="DESCRIPTION" value="Demo Order"/>
<input type="hidden" name="RETURNURL" value="https://localhost:44396/simulator/confirm"/>
<input type="hidden" name="NOTIFYURL" value=""/>
<input type="hidden" name="LANGUAGE" value="GB"/>
<input type="hidden" name="ORDERSUMMARY" value=""/>
<input type="hidden" name="STATEMENTDESCRIPTION" value=""/>
<input type="hidden" name="ADDRESS" value=""/>
<input type="hidden" name="POSTALCODE" value=""/>
<input type="hidden" name="CITY" value=""/>
<input type="hidden" name="COUNTRY" value=""/>
<input type="hidden" name="ISRECURRINGPAYMENT" value=""/>
<input type="hidden" name="SUBSCRIPTIONDATA" value=""/>
</form>
Sample Hosted Payment Response
<form name="PaymentReturn" method="POST" action='{MERCHANT RETURN URL}' >
<input type="hidden" name="ACKNOWLEDGEMENT_URL" value=""/>
<input type="hidden" name="ORDERREF" value="PL220720173825485"/>
<input type="hidden" name="AMOUNT" value="11.00"/>
<input type="hidden" name="CURRENCY" value="MYR"/>
<input type="hidden" name="APPROVAL_CODE" value="115893"/>
<input type="hidden" name="PAYMENT_DESCRIPTION" value="Success (Paid)"/>
<input type="hidden" name="PAYMENT_REFERENCE1" value="3264188"/>
<input type="hidden" name="PAYMENT_REFERENCE2" value="3141268"/>
<input type="hidden" name="PAYMENT_REFERENCE3" value="SIM0000000130"/>
<input type="hidden" name="PAYMENT_STATUS" value="APPROVED"/>
<input type="hidden" name="PAYMENT_STATUSCODE" value="1"/>
<input type="hidden" name="PAYMENT_TYPE" value="Credit and debit cards"/>
<input type="hidden" name="PAYMENT_CHANNEL" value="Visa"/>
<input type="hidden" name="MERCHANT_ID" value="914f825e-2b51-4318-b0a8-22c601b5979e"/>
<input type="hidden" name="CARD_NUMBER" value="411111XXXXXX1111"/>
<input type="hidden" name="SIGNATURE"
value="5873702BBE78C2DDC1742C2AED8F1264A6852422CD414F7016E2EDE2A2CBE69131FE6130979F061A65EECEF5E2B
727422DB41729C2D634CEB0CF827B79038A4C"/>
</form>
{
"merchant_txnid": "SIM0000000130",
"txn_amount": 11.0,
"request_type": "Refund",
"signature":
"CB466D4B1459F4F508944C4F4E427BD1434800B027F258F28D45BF8AA4461FD1EFCC374692B84E7E354EE33384B623584
6668D0D33AA3789FBB487F7E64332E5"
}
{
"request_type": "Refund",
"txn_status": "REFUNDFAIL",
"txn_statuscode": "12",
"txn_statusdesc": "REFUNDFAIL",
"provider_desc": "Transaction status is not valid to perform your action.",
"signature":
"8D36EF437F524E800E17ACC9891018C24FC8BEA1A769C7DE61962C914E74023848D1ECF8E843DC1D01F05D10FA10BF22
E481F19C56E3DC89054D3AA46F973681",
"approval_code": "115893",
"transaction_no": "3264188",
"transaction_ref1": "3264188",
"txn_amount": 11.00,
"txn_currency": "MYR",
"merchant_txnid": "SIM0000000130",
"txn_entryId": "3cfcc9a6-7c91-415b-8fb9-389804e8f95f"
}
{
"merchant_txnid": "SIM0000000130",
"order_ref": null,
"request_type": "Inquiry",
"signature":
"9759ABB5B51532335AAD5427F4475E38624F5FF25E9A0708B3B625A53F52230160EA1D49CCB65CCD8AD43C2F3765F1AE
3892A48D53EF74C75EF57B345635CCDB"
}
{
"request_type": "Inquiry",
"txn_status": "APPROVED",
"txn_statuscode": "1",
"provider_desc": "Approved",
"signature":
"5F88FEAE1B21BCEDEDF9238779B9D99B0DF0FE6609D7D1562968D10E762FC255B96F351F71B97838AEC9E5AEFD241A19
4642B880711D70F3A6EC8685DD04E42D",
"approval_code": "115893",
"transaction_no": "3264188",
"txn_amount": 11.17,
"txn_currency": "MYR",
"merchant_txnid": "SIM0000000130",
"txn_entryId": "3cfcc9a6-7c91-415b-8fb9-389804e8f95f",
"masked_cardno": "411111XXXXXX1111"
}
Endpoints#
Payment Option:
SandBox : https://sandbox.api.wowpay.io/api/paymentoptions
Production : https://api.wowpay.io/api/paymentoptions
Hosted Payment:
SandBox : https://sandbox.pay.wowpay.io/hosted/payment
Production : https://pay.wowpay.io/hosted/payment
Payment Actions:
SandBox : https://sandbox.api.wowpay.io/api/paymentaction
Production : https://api.wowpay.io/api/paymentaction
Retrive Subscription:
SandBox : https://sandbox.api.wowpay.io/api/subscription/RetriveAll
Production : https://api.wowpay.io/api/subscription/RetriveAll
Upgrade Subscription:
SandBox : https://sandbox.api.wowpay.io/api/subscription/Upgrade
Production : https://api.wowpay.io/api/subscription/Upgrade
Cancel Subscription:
SandBox : https://sandbox.api.wowpay.io/api/subscription/Cancel
Production : https://api.wowpay.io/api/subscription/Cancel
Curl Request Samples#
PaymentOptions :
curl -X POST -k -H 'Content-Type: application/json' -i 'https://sandbox.api.wowpay.io/api/paymentoptions'
--data '{
"merchant_code": "TESTMIDCODE",
"username": "TESTMIDCODE",
"password": "TESMIDCODE",
"merchant_id": "f9a27d58-1172-4f7e-8da8-dacdf7662d56",
"currency": "THB",
"country": "ALL",
"product_code": "ALL"
}'
Payment Actions :
curl -X POST -k -H 'BasicAuth: Q0FQVFVSRUpBQzAwMjMyMEMzQllLMU1SWlRNV0NDOUhCRUswVEdJM0JHMTZDMjFaS1paM1pVWFdWM0E9' -H 'Content-Type: application/json' -i 'https://sandbox.api.wowpay.io/api/paymentaction'
--data '{
"merchant_txnid": "JAC002320",
"order_ref": null,
"txn_amount": 100.00,
"request_type": "Capture",
"signature": "C71255768ADD0531EFAD4329AD1DAFA14D06A8C4648EDB01B8869BA1EC62E4D95269888E059C42FEF7C444105C6C7E5972D4701BD0A72E9F01473B1197D441B2",
"merchant_id": "b383441d-4e4c-4023-9463-f2d781b6d302"
}'
Retrive Subscription :
curl --location --request POST 'https://sandbox.api.wowpay.io/api/subscription/retriveall' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchant_id": "e81932f2-71b7-4e78-96c8-f8cc42f2d6b7",
"subscription_status": 0,
"customer_id": "dfdf",
"subscription_code": "gghgg",
"duedate_from": "2023-04-10T10:47:08.1751526+05:30",
"duedate_to": "2023-04-10T10:47:08.17526+05:30",
"createddate_from": "2023-04-10T10:47:08.1753243+05:30",
"createddate_to": "2023-04-10T10:47:08.1753786+05:30",
"list_count": 50
}'
Upgrade Subscription
curl --location --request POST 'https://sandbox.api.wowpay.io/api/subscription/upgrade' \
--header 'Content-Type: application/json' \
--data-raw '
{
"subscription_code": "fgfgfgf",
"subscription_status": 3,
"merchant_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "CustomerId",
"description": "Description",
"charge_type": 0,
"frequency_type": 0,
"subscription_period": 0,
"total_amount": 10.0,
"currency": "USD",
"days_before_tocharge": 0,
"recurring_payments": [{
"payment_code": "12121",
"amount": 10.0,
"payment_date": "2023-04-09T22:55:53.4044012+05:30",
"description": "Description",
}
],
"id": "00000000-0000-0000-0000-000000000000",
}
'
Cancel Subscription
curl --location --request POST 'https://sandbox.api.wowpay.io/api/subscription/cancel' \
--header 'Content-Type: application/json' \
--data-raw '
{
"id": "00000000-0000-0000-0000-000000000000",
"merchant_id": "00000000-0000-0000-0000-000000000000",
"subscription_status": 2,
"comments": ""
}
'
Appendix#
Product Code#
Product Code | Product Name |
---|---|
ALL | All |
HO | Hotel Only |
FO | Flight Only |
PACKAGE | Package |
TO | Tour Only |
Test | Test Product |
ACT | Activities |
OTH | Others |
PROMO | PROMO |
Transaction Status
Code | Status |
---|---|
0 | DECLINED |
1 | APPROVED |
2 | WAITTOPAY |
3 | CANCELLED |
4 | AUTHORIZED (* Merchant should call capture action) |
5 | DUPLICATERQ |
6 | VOIDED |
7 | FULLYREFUNDED |
8 | PARTIALLYREFUNDED |
9 | FULLYCAPTURED |
10 | PARTIALLYCAPTURED |
11 | VOIDFAIL |
12 | REFUNDFAIL |
13 | CAPTUREFAIL |
14 | ERROR |
15 | EXPIRED |
16 | NON3DNOTALLOWED |
17 | REQUESTRECEIVED |
18 | PROCESSING |
19 | NORESPONSE |
20 | REFUNDPROCESSING |
21 | CAPTUREPROCESSING |
22 | VOIDPROCESSING |
23 | SESSIONEXPIRED |
24 | SETTLED |
25 | CREATED |
26 | CUSTOMERPAYING |
27 | FRAUD |
28 | TXNIDMISMATCH |
Payment flow diagram#
Credit Card
Integration Guide
Credit card
Online Banking
Credit card (auth)