課金: Update

このリクエストでは、アプリトークン・シークレット・店舗ID・課金IDを指定することで、作成された既存の課金についての情報を更新することができます。
作成済の課金に任意のメタデータを付与、または変更したい場合はこのリクエストをお使いください。

Request

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

Parameters:

Parameters
metadataobject
課金に紐づいているメタデータ

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/charges/0fe1e42a-1845-11e7-9b1f-d3bd0c055a99 \
--header 'Authorization: Bearer {secret}.{jwt}' \
--header 'content-type: application/json' \
--data '{"metadata": {"order_id": 1234}}'

Response

Code: 200

Headers:

Content-Type: application/json

Body:

{
  "id": "0fe1e42a-1845-11e7-9b1f-d3bd0c055a99",
  "store_id": "af857264-180c-11e7-9be2-276aea4fed28",
  "transaction_token_id": "06e076b6-1845-11e7-a7bf-67a3521ea48c",
  "requested_amount": 1000,
  "requested_currency": "JPY",
  "requested_amount_formatted": 1000,
  "charged_amount": 1000,
  "charged_currency": "JPY",
  "charged_amount_formatted": 1000,
  "status": "pending",
  "error": null,
  "metadata": {
    "order_id": 1234,
    "shipping_details": "Customer wants it now"
  },
  "mode": "test",
  "created_on": "2018-07-13T02:55:00.07367Z"
}