---
# System prepended metadata

title: Epay-Igs-Sslcommerz

---

# Epay-Igs-Sslcommerz

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

## Payments

### Payment Init

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


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Payment created!!",
  "data": {
    "redirectGatewayURL": "https://sandbox.sslcommerz.com/gwprocess/v4/bankgw/indexhtml.php?mamount=100.00&ssl_id=210414215935tpsFIhvi8IZcTDc&Q=REDIRECT&SESSIONKEY=E56666DE9E3919984FAE6A6910893C2E&tran_type=success&cardname=",
    "epay_payment_id": "3ccbce9eae9f4bca9d9502df69f93485"
  }
}
```


### Payment Query

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


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Payment fetched!",
  "data": {
    "epay_payment_id": "d1ad2bf44da54959abbb3dd34c101cf0",
    "gateway_response": [
      {
        "status": "VALIDATED",
        "tran_id": "d1ad2bf44da54959abbb3dd34c101cf0"
      }
    ],
    "gateway": "sslcommerz",
    "gateway_trx_id": "d1ad2bf44da54959abbb3dd34c101cf0",
    "status": "completed",
    "captured_at": "2021-04-13T10:15:27.992Z"
  }
}
```

## 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": {}
}
```
