---
# System prepended metadata

title: Epay-Giftcards

---

# Epay-Giftcards

`base_url` : `https://api-dev.evaly.com.bd/epay-gift-cards/v2`

## Payments

### Payment Init

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


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Payment created successfully!!",
  "data": {
    "epay_payment_id": "6a03d94cb475422b90f792ed14d77c90"
  }
}
```


### Payment Authenticate

Method: `Post`
URL: `{base_url}/payments/authenticate`

Request Body:

```json=
{
	"gift_code": "5cc278c",
	"epay_payment_id": "12a065e56d244922adc52d4d73bffb62"
}
```

Response:
```status_code: 201```
```json=
{
    "success": true,
    "message": "Otp sent successfully!!",
    "data": {}
}
```


### Payment Execute

Method: `Post`
URL: `{base_url}/payments/execute`

Request Body:

```json=
{
    "otp":"195312",
    "epay_payment_id": "12a065e56d244922adc52d4d73bffb62"
}
```

Response:
```status_code: 201```
```json=
{
    "success": true,
    "message": "Payment successful!!",
    "data": {}
}
```


### Payment Query

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


Response:
```status_code: 200```
```json=
{
  "success": true,
  "message": "Payment created successfully!!",
  "data": {
    "epay_payment_id": "48b34e6a555b4d638da674fcde66be4e",
    "gateway_response": [],
    "gateway": "gift_code",
    "status": "completed",
    "captured_at": "2021-04-07T07:43:00.212Z"
  }
}
```

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