返金: Update

このリクエストでは、アプリトークン・シークレット・店舗ID・課金IDを指定することで、返金した時に付与したメタデータを編集することができます。

Request

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

Parameters:

Parameters
metadatajson
返金(Refund)に紐づくメタデータ

Headers:

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

Body:

curl --request PATCH \
--url https://api.gyro-n.money/stores/af857264-180c-11e7-9be2-276aea4fed28/refunds/0fe1e42a-1845-11e7-9b1f-d3bd0c055a99 \
--header 'Authorization: Bearer {secret}.{jwt}' \
--header 'content-type: application/json' \
--data '{"metadata": {"customer_id": 1234}}'

Response

Code: 200

Headers:

Content-Type: application/json

Body:

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