Refunds: Create

Request

POST https://api.gyro-n.money/stores/{storeId}/charges/{chargeId}/refunds

Parameters:

Parameters
amountnumber [Required]
The amount to refund. Must be less than or equal to the amount that was charged.
currencystring (ISO-4217) [Required]
Currency of the refund.
reasonstring
The reason of its refund request. Must be one of fraud, duplicate, or customer_request.
messagestring
Further information for why the refund was made.
metadatajson
Any metadata to associate with the refund.

Headers:

Content-Type: application/json
Authorization: Bearer {secret}.{jwt}

Body:

curl --request POST \
--url https://api.gyro-n.money/stores/f1054498-18f3-11e7-93ff-bb609c8f3ef7/charges/f96eeb3e-18f3-11e7-93ff-1fbf78b8196b/refunds \
--header 'Authorization: Bearer {secret}.{jwt}' \
--header 'content-type: application/json' \
--data '{
  "amount": 250,
  "currency": "USD",
  "reason": "customer_request",
  "message": "15 percent off",
  "metadata": {
      "coupon": "VIP007"
  }
}'

Response

Code: 201

Headers:

Content-Type: application/json

Body:

{
  "id": "72491cc0-1906-11e7-82f4-230e1180f31c",
  "charge_id": "f96eeb3e-18f3-11e7-93ff-1fbf78b8196b",
  "status": "pending",
  "amount": 250,
  "currency": "USD",
  "amount_formatted": 2.5,
  "reason": "customer_request",
  "message": "15 percent off",
  "error": null,
  "metadata": {
    "coupon": "VIP007"
  },
  "mode": "test",
  "created_on": "2018-07-13T02:55:00.07367Z"
}