---
# System prepended metadata

title: Epay-Igs-Sebl

---

# Epay-Igs-Sebl

`base_url` : `http://api-dev.evaly.com.bd/epay-igs-nagad`

## Payments

### Payment Init

Method: `GET`
URL: `{base_url}/payments/init/{epay_payment_id}`


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Session created!!",
  "data": {
    "session_id": "SESSION0002647203488G67289083E2",
    "epay_payment_id": "55723367aa554eeda563be9fec423d29"
  }
}
```


### Payment Authenticate

Method: `GET`
URL: `{base_url}/payments/authenticate/{session_id}`


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Session authenticated!!",
  "data": {
    "redirectHtml": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><title>Process Secure Payment</title><meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\"><meta name=\"description\" content=\"Process Secure Payment\"><meta name=\"robots\" content=\"noindex\"><style type=\"text/css\">body {font-family:\"Trebuchet MS\",sans-serif; background-color: #FFFFFF; }#msg {border:5px solid #666; background-color:#fff; margin:20px; padding:25px; max-width:40em; -webkit-border-radius: 10px; -khtml-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;}#submitButton { text-align: center ; }#footnote {font-size:0.8em;}</style></head><body onload=\"return window.document.echoForm.submit()\"><form name=\"echoForm\" method=\"POST\" action=\"https://ap.gateway.mastercard.com/acs/MastercardACS/10db3672-c5be-4e55-bdaf-b04a7149f4cb\" accept-charset=\"UTF-8\"><input type=\"hidden\" name=\"PaReq\" value=\"eAFVUd9vgjAQfjfxfyC8j7ZAFzVnjYjLTJxx/liyvTFokCggBYz+97sizK3pQ7/vet/dfQeTa3oyLlKVSZ6NTWZR05BZmEdJFo/N/e7laWBORL8Hu4OS0t/KsFZSwJssyyCWRhJhDqXUGTo2dynnpoD1dCMLAa2mQEnLBtJBTFXhIcgqAUFYeIuV4IxyhwNpIaRSLXzBkXSYTfXFAkDuNGRBKsX8Y7r8NLZzb2l4PpCGgzCvs0rdBOX4uwNQq5M4VNW5HBEiL8HpZoV5an1HBIgOAXn0s651ZyWOd00iURXH9Ct+3uzd1f4Se++FNyNHksy27mAMRP+AKKiksKnNqMtcg9ERG44oztrwEKS6IeH5OwxRS8/QUnDWlab3uJ4OQ38pQJMVbqGbpUMgr+c8kyiKRX7fQB6Nz161rWGlDWS243It3pyBNrgJaJUEfcK20fUWANGppN0dmtLsF5l/e+/3fgC3Y7Ct\"><input type=\"hidden\" name=\"TermUrl\" value=\"https://api-dev.evaly.com.bd/epay-igs-sebl/payments/execute/c16b0f15953c4210bc1c48a4903bd597\"><input type=\"hidden\" name=\"MD\" value=\"\"><noscript><div id=\"msg\"><div id=\"submitButton\"><input type=\"submit\" value=\"Click here to continue\" class=\"button\"></div></div></noscript></form></body></html>\n"
  }
}
```

### Payment Query

Method: `GET`
URL: `{base_url}/payments/query/{epay_payment_id}`


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Payment fetched successfully",
  "data": {
    "epay_payment_id": "5013ce489e7e430383677fbfa5547929",
    "gateway_response": [
      {
        "3DSecure": {
          "acsEci": "02",
          "authenticationStatus": "AUTHENTICATION_SUCCESSFUL",
          "authenticationToken": "jHyn+7YFi1EUAREAAAAvNUe6Hv8=",
          "enrollmentStatus": "ENROLLED",
          "xid": "cqzIbjtALH+roc+Mh5XWuFTTqbY="
        },
        "3DSecureId": "auth-5013ce489e7e430383677fbfa5547929",
        "authorizationResponse": {
          "cardSecurityCodeError": "M",
          "commercialCard": "888",
          "commercialCardIndicator": "3",
          "financialNetworkCode": "777",
          "posData": "1025100006600",
          "posEntryMode": "812",
          "processingCode": "003000",
          "responseCode": "00",
          "stan": "219564",
          "transactionIdentifier": "123456789"
        },
        "device": {
          "browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
          "ipAddress": "27.131.14.13"
        },
        "gatewayEntryPoint": "WEB_SERVICES_API",
        "merchant": "TESTSEBLEVALY",
        "order": {
          "amount": 100,
          "creationTime": "2021-04-13T15:07:26.248Z",
          "currency": "BDT",
          "id": "5013ce489e7e430383677fbfa5547929",
          "reference": "5013ce489e7e430383677fbfa5547929",
          "status": "CAPTURED",
          "totalAuthorizedAmount": 100,
          "totalCapturedAmount": 100,
          "totalRefundedAmount": 0
        },
        "response": {
          "acquirerCode": "00",
          "acquirerMessage": "Approved",
          "cardSecurityCode": {
            "acquirerCode": "M",
            "gatewayCode": "MATCH"
          },
          "gatewayCode": "APPROVED"
        },
        "result": "SUCCESS",
        "risk": {
          "response": {
            "gatewayCode": "ACCEPTED",
            "review": {
              "decision": "NOT_REQUIRED"
            },
            "rule": [
              {
                "data": "NO_LIABILITY_SHIFT",
                "name": "MERCHANT_3D_SECURE",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "data": "512345",
                "name": "MERCHANT_BIN_RANGE",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "data": "M",
                "name": "MERCHANT_CSC",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "data": "27.131.14.13",
                "name": "MERCHANT_IP_ADDRESS_RANGE",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "data": "BGD",
                "name": "MERCHANT_IP_COUNTRY",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "name": "SUSPECT_CARD_LIST",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "name": "TRUSTED_CARD_LIST",
                "recommendation": "NO_ACTION",
                "type": "MERCHANT_RULE"
              },
              {
                "data": "NO_RULES",
                "name": "MSO_3D_SECURE",
                "recommendation": "NO_ACTION",
                "type": "MSO_RULE"
              },
              {
                "data": "512345",
                "name": "MSO_BIN_RANGE",
                "recommendation": "NO_ACTION",
                "type": "MSO_RULE"
              },
              {
                "data": "M",
                "name": "MSO_CSC",
                "recommendation": "NO_ACTION",
                "type": "MSO_RULE"
              },
              {
                "data": "27.131.14.13",
                "name": "MSO_IP_ADDRESS_RANGE",
                "recommendation": "NO_ACTION",
                "type": "MSO_RULE"
              },
              {
                "data": "BGD",
                "name": "MSO_IP_COUNTRY",
                "recommendation": "NO_ACTION",
                "type": "MSO_RULE"
              }
            ]
          }
        },
        "sourceOfFunds": {
          "provided": {
            "card": {
              "brand": "MASTERCARD",
              "expiry": {
                "month": "5",
                "year": "21"
              },
              "fundingMethod": "CREDIT",
              "issuer": "AFRILAND FIRST BANK",
              "number": "512345xxxxxx0008",
              "scheme": "MASTERCARD"
            }
          },
          "type": "CARD"
        },
        "timeOfRecord": "2021-04-13T15:07:26.258Z",
        "transaction": {
          "acquirer": {
            "batch": 20210413,
            "date": "0413",
            "id": "SEBL_S2I",
            "merchantId": "505331201201000",
            "settlementDate": "2021-04-13",
            "timeZone": "+0600",
            "transactionId": "123456789"
          },
          "amount": 100,
          "authorizationCode": "219564",
          "currency": "BDT",
          "frequency": "SINGLE",
          "id": "pay-5013ce489e7e430383677fbfa5547929",
          "receipt": "110315219564",
          "reference": "5013ce489e7e430383677fbfa5547929",
          "source": "INTERNET",
          "terminal": "16294812",
          "type": "PAYMENT"
        },
        "version": "44"
      }
    ],
    "gateway": "southeast_bank",
    "status": "completed",
    "captured_at": "2021-04-13T15:07:26.461Z"
  }
}
```

## Refunds

### Refund Init

Method: `POST`
URL: `{base_url}/refund/init`


Headers:
```json=
{
    "secret-key": <secret key>
}
```

Request Body:

```json=
{
    "gateway_payment_id":"6075a31101c3f30012549920",
    "amount": 100,
    "refund_operation_id": "1bw2asma2wkmkc"
}
```

Response:

```status_code: 201```
```json=
{
    "success": true,
    "message": "Refund created!!",
    "data": {}
}
```
