API & Integration Docs

Web Integration

Accept payments from your customers in a secure and quick manner with Paycaps. Your customers get a streamlined flow with the ‘Checkout’ form for initiating payments. The payment details shared by your customer are tokenised by Paycaps. tag as data attributes. You can submit additional fields, visible or hidden, along with the form.

With this sample code given below, Paycaps ‘Checkout’ options will be passed as the HTML data attributes.

After the completion of the checkout process, an additional field <name=id> will be added to the form containing the script tag. Post this, the form is submitted automatically. With the authorisation of the payment made, the form along with the paycaps_payment_id to the action url.

Note: In the below mentioned code, replace the URL with the success callback URL of your website.

Paycaps provides its customers with the ‘Retry’ option in case of a failure.

Getting Started

Web integration is the simplest, quick and easy way to integrate the Paycaps in your Website. When using this mode of integration customers will be redirected from your checkout page to the Paycaps payment page to collects payment details which has built-in support for Saved Cards, Credit and Debit Cards, UPI wallets and much more.

Payment page is Hosted at Paycaps Servers which are PCI DSS compliant so that the merchant does not have to worry about the PCI DSS.

Enforce payment mode(RFU)

Payment Flow

Sample Flow diagram

Generating Test Credentials

  1. Login to your merchant account
  2. Click on My Account Tab
  3. Click on My Profile
  4. You can find Salt key and APP_ID value under Integration Tab

Alternatively, you can contact the integration support team/RM to get the keys.

Checkout API

Create the order form

Request URls

Integration: https://sandbox.paycaps.com/pgui/jsp/paymentrequest

Production: https://secure.paycaps.com/pgui/jsp/paymentrequest

Generating Secure Hash

Every request is accompanied by a secure Hash that verifies the request’s Integrity as well as merchant identity. The secure Hash algorithm is SHA-256.

To generate secure Hash use the following method: Take all the request parameters that are to be
sent to Paycaps and sort them in ascending order according to the name of each field.

Now prepare a String of these sorted name value params with Tiled (~) as the separator like:

Next step is to append the Salt Key at the end of the parameter string given by Paycaps Payment
Gateway to you. After adding you will get the following output (If salt key is b6200e78557e4e55)

Note: Please append the secret key in lower case without any separator after the last value.

After completing the above-mentioned process, you will have to call SHA 256 algorithm and pass the parameter string to the same and the SHA will return you the desired result as below

Hash value= {6797f1842deb4f3ebaead53e1bafd5a535d322b9fa3893f201fdb03933eeae09}

Now you must convert the generated value to the Upper Case, and you will get the final result as hash value

Hash value = 6797F1842DEB4F3EBAEAD53E1BAFD5A535D322B9FA3893F201FDB03933EEAE09

Submitting Form

Once you have prepared the form the user can click on the submit button or you can implement an automatic javascript for form auto submit and user will be redirected to Paycaps payment page.

Note: To maximize conversion, Paycaps recommends that you redirect customers to the Payment Gateway in the same browser window.

Note: Amount format is in the least parts without decimals like AED 1200.23 will be written as 120023 and AED 1.00 as 100

Test Cards

You use these cards in your test suite.

Validating response

The merchant application must validate the transaction response in the status response. This can be done as follows:

Match the response hash that is present in the response against the merchant application calculated hash value using the response params. In case the merchant hash does not match that transaction must not be considered a successful transaction.

For successful transaction RESPONSE_CODE is 000 and STATUS is “Captured” or “Approved”.

Note: Please ensure that response Hash is validated in your production system.

Call the status API and verify the result received real time.

Request Params

Field nameDescriptionRequiredTypeMinMaxExample
Merchant Details
APP_IDAPP ID is a unique merchant identifier provided by PaycapsYESNU1616160234578452178
ORDER_IDMerchant reference numberYESAN150ESN78452
RETURN_URLUrl of merchant website to get the response after transaction is processeYESCH51024http://www.response.com
HASHUnique value generated by SHA 256 hashing algorithmYESAN64647995156CE4C40C44C41BECA3B9CE09B9
Customer Details
CUST_NAMECustomer nameNOCH1150John Pal
CUST_FIRST_NAMECustomer first nameNOCH2150John
CUST_LAST_NAMECustomer last nameNOCH2150Pal
CUST_STREET_ADDRESS1Customer addressNOCH2250House no-101
CUST_CITYCustomer cityNOCH250Dubai
CUST_STATECustomer cityNOCH250Dubai
CUST_COUNTRYCustomer countryNOCH250Dubai
CUST_ZIPCustomer zipNOCH250Dubai
CUST_PHONE*Customer phoneNOCH250Dubai
CUST_EMAIL*Customer emailNOCH250Dubai
CUST_SHIP_LAST_NAME*Customer Shipping last nameNOCH250Dubai
Customer shipping first nameCustomer emailNOCH250Dubai
CUST_SHIP_NAMECustomer shipping nameNOCH250Dubai
CUST_SHIP_STREET_ADDRESS1Customer shipping addressNOCH250Dubai
CUST_SHIP_STREET_ADDRESS2Customer shipping addressNOCH250Dubai
CUST_SHIP_CITYCustomer shipping cityNOCH250Dubai
CUST_SHIP_STATECustomer shipping stateNOCH250Dubai
CUST_SHIP_COUNTRYCustomer shipping countryNOCH250Dubai
CUST_SHIP_ZIPCustomer shipping zipNOCH250Dubai
CUST_SHIP_PHONECustomer shipping phoneNOCH250Dubai
Payment Details
AMOUNT**Total Sale AmountNOCH250Dubai
CURRENCY_CODE3-digit code of the currencyNOCH250Gurgaon
Item Level Details
PRODUCT_DESCDescription of productNOCH250Dubai

^Abbreviation NU – Numeric, CH – Character, AN – Alphanumeric

Response Params

Field nameDescriptionExample value
CUST_NAMECustomer nameJohn Pal
TXNTYPEType of transaction processedSALE/AUTH
AMOUNTTotal Sale Amount100
CURRENCY_CODE *3-digit code of the currency826
ORDER_IDMerchant reference numberESN78452
APP_IDAPP_ID is given by PayCaps160234578452178
TXN_IDTransaction Id generated by PayCaps to identify the current step150611417421130
PAYMENT_TYPEType of payment mode used by customerCC/DC/NB
MOP_TYPEMethod of paymentVI/MC/SBI
CARD_MASKMasked card number for card txns401200******1234
PG_REF_NUMId generated by PayCaps. Use for further communication with PayCaps, for tracking the full order150611417421129
RESPONSE_CODE *Code for transaction status000
RESPONSE_MESSAGE *Response message for transaction statusSUCCESS
HASH*Unique value generated by SHA 256 hashing algorithm7995156CE4C40C44C41BECA3B9CE09B9
ECIBank issued ECI flag
AUTH_CODEAuthorization code123456
RRNBank reference numberSUCCESS
AUTH_CODEAuthorization code123456
AVRAddress verification flagSUCCESS
ACQ_IDBank reference number123456
STATUSTransaction statusSUCCESS
CUST_EMAILEcho back field123456
CUST_IDEcho back fieldSUCCESS
CUST_PHONEEcho back field123456
PG_TXN_MESSAGEDetailed message for transactionSUCCESS
RETURN_URLEcho back fieldwww.merchantsite.com/paymentresponse
RESPONSE_DATEDetailed message for transactionSUCCESS
RESPONSE_TIMEEcho back fieldwww.merchantsite.com/paymentresponse
PRODUCT_DESCDetailed message for transactionSUCCESS
CARD_ISSUER_BANKEcho back fieldwww.merchantsite.com/paymentresponse
CARD_ISSUER_COUNTRYDetailed message for transactionSUCCESS
TOTAL_AMOUNTTotal amount debited to customer in case of surcharge model10134

Response Codes

You can use these codes for your test suite.

Ecommerce Plugins

Following are the various available Ecommerce plugins you can use:

CS Cart

Arastta

OpenCart

Magento

Wix.com

WordPress

WooCommerce

Language Toolkits

Following are the various resources you can use:

PHP

Nodejs

.Net

Java

Ruby

jj