Logoelepay
Refund

Create refund

Processes a full or partial refund for a charge.

POST
/charges/{id}/refunds
AuthorizationBearer <token>

API authentication is performed via Bearer auth using the secret key as the bearer token. The secret key is a critical key that allows all API operations, so handle it with care.

In: header

Path Parameters

id*string

Charge ID

Request Body

application/json

Refund details

amount*integer

Refund amount. You can refund the full amount, or refund any amount by specifying amount.

currency?string

Currency code (ISO 4217)

Default"JPY"
metadata?

Refund metadata

reason?string

Refund reason

Response Body

application/json;charset=utf-8

curl -X POST "https://api.elepay.io/charges/string/refunds" \  -H "Content-Type: application/json" \  -d '{    "amount": 0  }'
{
  "id": "string",
  "object": "refund",
  "chargeId": "string",
  "liveMode": true,
  "amount": 0,
  "currency": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "reason": "string",
  "status": "pending",
  "refundedTime": 0,
  "createTime": 0
}