AssurePe

API References

API References

Generate API Keys in Test and Live Modes, check error responses, parameters and other APIs.

API List:

 

 

S No

API

Owner

Description

1

Transaction Status

assurepe

To get status of transaction real time

2

Transaction refund API

assurepe

To initiate the transaction refund (full or part refund)

Methods

1. Transaction status

This API should be used for verification of transaction status before service delivery.

For successful debit the mandate is to match the following parameters:

RESPONSE_CODE=’000’ and RESPONSE_MESSAGE=’SUCCESS’ and STATUS=’Captured’

Get the status of transaction processed real time.

Authentication: Sha256 HASH along with request.

Request

Method

URL           

POST

https://priority.assurepe.com/pgws/transact

Type

Params

Values

POST

POST

POST

POST

POST

POST

PAY_ID

ORDER_ID

AMOUNT

TXNTYPE

CURRENCY_CODE

HASH

string

string

string

STATUS

Number

string

ORDER_ID: Order ID generated by merchant

TXN_ID: Transaction ID generated by PG

Request

{

“PAY_ID”: “1001180108120354”,

“ORDER_ID”: “ORDER00123”,

“AMOUNT”: “1500”,

“TXNTYPE”: “STATUS”,

“CURRENCY_CODE”:”356″,

“HASH”:”59833FF8874B68EDAC684AE46036DDA52336C9114C38DA871AC643B14243FFDD”

}

Response

{

    “RESPONSE_DATE_TIME”: “2019-05-15 16:49:41”,

    “RESPONSE_CODE”: “000”,

    “TXN_ID”: “1426090515164549”,

    “MOP_TYPE”: “VI”,

    “CARD_MASK”: “437748******9702”,

    “ACQ_ID”: “5579189904646365204070”,

    “TXNTYPE”: “SALE”,

    “CURRENCY_CODE”: “356”,

    “RRN”: “913511236314”,

    “SURCHARGE_FLAG”: “Y”,

    “PAYMENT_TYPE”: “CC”,

    “PG_TXN_MESSAGE”: “SUCCESS”,

    “STATUS”: “Captured”,

    “PG_REF_NUM”: “1426090515164549”,

    “PAY_ID”: “1001281010142121”,

    “ORDER_ID”: “2002990137”,

    “AMOUNT”: “662100”,

    “RESPONSE_MESSAGE”: “SUCCESS”,

    “ORIG_TXN_ID”: “1426090515164549”,

    “TOTAL_AMOUNT”: “676163”,

    “CUST_NAME”: “Shaiwal”,

    “IS_STATUS_FINAL”: “Y”

}

2. Refund

Initiate a refund transaction via API

Authentication: Sha256 HASH along with request.

Request

Method

URL           

POST

https://priority.assurepe.com/pgws/transact

S No

Params

Value Type

Mandatory

1

2

3

4

5

6

7

8

PG_REF_NUM

REFUND_FLAG

AMOUNT

TXNTYPE

ORDER_ID

REFUND_ORDER_ID

PAY_ID

HASH

number

string

number

REFUND

number

string

string

string

Yes

Yes

Yes

Yes

Yes

No

Yes

Yes

ORDER_ID: Order ID generated by merchant for original transaction

REFUND_ORDER_ID: Order ID generated by merchant for refund transaction

TXN_ID: Transaction ID generated by PG

Request

{

“PAY_ID”: “1014400316171941”,

“ORDER_ID”: “INST1603200501810”,

“AMOUNT”: “100”,

“REFUND_FLAG”: “C”,

“PG_REF_NUM”: “3706601020185838”,

“REFUND_ORDER_ID”: “REFINST1603200501810”,

“TXNTYPE”:”REFUND”,

“CURRENCY_CODE”:”356″,

“HASH”:”6648EA6E7EE5743E98D4199FAE0D4021EE8796E9394249292D482F974905F0FA”

}

Response

{

“RESPONSE_DATE_TIME”: “2020-10-21 13:06:53”,

“RESPONSE_CODE”: “000”,

“REFUND_FLAG”: “C”,

“AUTH_CODE”: “000000”,

“CARD_MASK”: “401200******1112”,

“MOP_TYPE”: “VI”,

“CURRENCY_CODE”: “356”,

“RRN”: “029510000287”,

“CARD_HOLDER_NAME”: “se”,

“PG_TXN_MESSAGE”: “CAPTURED”,

“STATUS”: “Captured”,

“PG_REF_NUM”: “1006601021130643”,

“AMOUNT”: “100”,

“RESPONSE_MESSAGE”: “SUCCESS”,

“CUST_EMAIL”: “purposet923@gmail.com”,

“REFUND_ORDER_ID”: “REFINST1603200501810”,

“TXN_ID”: “1006601021130643”,

“ACQ_ID”: “202029532980776”,

“TXNTYPE”: “REFUND”,

“HASH”: “6462DA11408B777593DD2CB950A8A3E9F57BD3FA7F7384A20CE48BC99771864B”,

“PAYMENT_TYPE”: “CC”,

“PAY_ID”: “1014400316171941”,

“ORDER_ID”: “INST1603200501810”,

“ORIG_TXN_ID”: “3706601020185838”,

“TOTAL_AMOUNT”: “10000”

}

Appendix:

  1. Response Codes:

Response Code

Response message

000

Success

001

Acquirer Error

002

Denied

003

Timeout

004

Declined

005

Authentication not available

006

Transaction processing

007

Rejected by acquirer

008

Duplicate

009

Response signature did not match

010

Cancelled by user

011

Authorization success but error processing recurring payment

012

Denied due to fraud detection

013

Total refund amount greater than sale amount

014

Refund Amount should be less than today’s Captured Amount

015

Transaction not found

For invalid/error transactions:

Response Code

Response Message

300

Invalid Request

900

Internal system error

999

Unknown Error

  1. Parameters

Field name

Description

Type*

Min

Max

Example

PAY_ID

Pay ID is provided by PG to uniquely identify the merchant

NU

16

16

160234578452178

ORDER_ID

Merchant reference number for every transaction

AN

1

50

ESN78452

REFUND_ORDER_ID

Reference number generated for refund transaction

AN

1

50

ESN78453

HASH

Unique value generated by SHA 256 hashing algorithm

AN

64

64

7995156CE4C40C44C41BECA3B9CE09B9

AMOUNT*

Total Sale Amount

NU

3

12

100

REFUNDAMOUNT

Amount of refund transaction

NU

3

12

100

RESPONSE_CODE

Code for  transaction status

 

NU

3

3

000

RESPONSE_MESSAGE

Response message for transaction status

AN

1

256

SUCCESS

CUST_NAME

Customer name

A

1

150

John

CURRENCY_CODE

3-digit code of the currency

NU

3

3

356

TXNTYPE

Type of transaction

A

4

15

SALE/AUTH

TXN_ID

Transaction Id generated by PG

NU

16

16

150611417421130

STATUS

Transaction status

A

5

30

Approved/Captured/Declined

PG_REF_NUM

Id use for further communication with gateway

NU

16

16

150611417421129

AUTH_CODE

Authorization code

AN

1

6

123456

RRN

Bank reference number

AN

1

50

BA4545395

IS_STATUS_FINAL

Status indicator of the transaction if further polling is required

A

1

1

Y or N

*AN: Alphanumeric

 NU: Numeric

 A: Alphabetic