Recurringの 既存Charge Permission に対して、platformIdを設定するにはどうしたら良いですか?
カートシステム間の移動により事業者様が既にお持ちのRecurring用のCharge Permissionの場合、以下手順でplatformIdを設定していただくことが可能です。
実装方法
既存のRecurring用のCharge Permissionに対して、注文時に呼び出すCreate Charge API の Request parameter にplatformIdを設定してください。
サンプルRequest("platformId":"A08593053M41F7TQ7YR7W"
を設定)
curl "https://pay-api.amazon.jp/:environment/:version/charges/" \
-X POST
-H "x-amz-pay-idempotency-key: AVLo5tI10BHgEk2jEXAMPLEKEY"
-H "authorization: Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-d @request_body
Payload
{
"chargePermissionId": "B03-1111111-1111111",
"chargeAmount": {
"amount": "1400",
"currencyCode": "JPY"
},
"captureNow": true, // default is false
"softDescriptor": "Descriptor",
"canHandlePendingAuthorization": false, //default is false
"platformId":"A08593053M41F7TQ7YR7W"
}
Response
{
"chargeId": "P03-1111111-1111111-C111111",
"chargePermissionId": "B03-1111111-1111111",
"chargeAmount": {
"amount": "1400",
"currencyCode": "JPY"
},
"captureAmount": {
"amount": "1400",
"currencyCode": "JPY"
},
"refundedAmount": {
"amount": "0.00",
"currencyCode": "JPY"
},
"softDescriptor": "Descriptor",
"statusDetail": {
"state": "Captured",
"reasonCode":null,
"reasonDescription": null,
"lastUpdatedTimestamp": "20190714T155300Z"
},
"creationTimestamp": "20190714T155300Z",
"expirationTimestamp": "20190715T155300Z",
"platformId" : "A08593053M41F7TQ7YR7W"
}
※但し、Get Charge API では設定後も"platformId": null
となりますのでご留意ください。
{
"chargeId": "P03-1111111-1111111-C111111",
"chargeAmount": {
"amount": "1400",
"currencyCode": "JPY"
},
"chargePermissionId": "B03-1111111-1111111",
"captureAmount": {
"amount": "1400",
"currencyCode": "JPY"
},
"refundedAmount": {
"amount": "0",
"currencyCode": "JPY"
},
"softDescriptor": "Descriptor",
"providerMetadata": {
"providerReferenceId": null
},
"convertedAmount": null,
"conversionRate": null,
"merchantProvidedChannel": null,
"paymentInitiator": null,
"statusDetails": {
"state": "Captured",
"reasonCode": null,
"reasonDescription": null,
"lastUpdatedTimestamp": "20230125T124526Z"
},
"creationTimestamp": "20230125T124526Z",
"expirationTimestamp": "20230224T124526Z",
"releaseEnvironment": "Live",
"merchantMetadata": {
"merchantReferenceId": null,
"merchantStoreName": null,
"noteToBuyer": null,
"customInformation": null
},
"platformId": null
}