定期課金 – LIST
定期課金オブジェクトに対するLISTリクエストには以下が必要です。(括弧内は入力箇所)
- 店舗ID(URLの
{storeId}
部分) - シークレット(Headerの
{secret}
部分) - アプリトークン(Headerの
{jwt}
部分)
リクエスト
CommandとHeader
curl --request GET \
--url https://api.univapay.com/stores/{storeId}/subscriptions \
--header 'Authorization: Bearer {secret}.{jwt}'
利用できるパラメータ
リクエストURLに追加できるクエリパラメータは以下です。
全てがand条件で検索され、リストが作成されます。
フィールド | データ型 | 備考 |
---|---|---|
search | 半角英数 | メタデータの値で検索 |
status | 半角英 | 定期課金のステータスunverified , unconfirmed , canceled , unpaid , suspended , current , completed のいずれか |
mode | 半角英 | 定期課金の実行モードlive ,test のいずれか |
記述例
curl --request GET \
--url https://api.univapay.com/stores/11edf541-c42d-653c-8c3d-dfe0a55f95c0/subscriptions \
--header 'Authorization: Bearer {secret}.{jwt}'
レスポンス
下記は記述例でリクエストした場合の例です。
CodeとHeader
- Code:
200
- Header:
Content-Type: application/json
Body
{
"items": [
{
"id": "11ef335e-9aa5-c54a-8313-7f9847da313a",
"store_id": "11edf541-c42d-653c-8c3d-dfe0a55f95c0",
"transaction_token_id": "11ef32a7-3a71-8662-803f-1bc27702eeec",
"amount": 1250,
"currency": "USD",
"amount_formatted": 12.50,
"initial_amount": null,
"initial_amount_formatted": null,
"subsequent_cycles_start": null,
"schedule_settings": {
"start_on": null,
"zone_id": "Asia/Tokyo",
"preserve_end_of_month": null,
"retry_interval": null,
"termination_mode": "immediate"
},
"only_direct_currency": false,
"first_charge_capture_after": null,
"first_charge_authorization_only": false,
"status": "current",
"metadata": {
"ServiceId": 78435694
},
"mode": "test",
"created_on": "2024-06-26T01:51:28.627023Z",
"period": "monthly",
"merchant_name": "管理画面ガイド",
"store_name": "管理画面ガイド_TEST店舗",
"payment_type": "card",
"next_payment_date": "2024-07-26",
"user_data": {
"type": "charge",
"cardholder_name": "taro yamada",
"email": "test@test.com",
"brand": "visa",
"gateway": null,
"service_provider": null
}
},
{
"id": "11ef3355-6cec-f0dc-a579-d3bb89aab116",
"store_id": "11edf541-c42d-653c-8c3d-dfe0a55f95c0",
"transaction_token_id": "11ef3355-6cc6-194e-a5e0-bfd94bdad70d",
"amount": 100,
"currency": "JPY",
"amount_formatted": 100,
"initial_amount": null,
"initial_amount_formatted": null,
"subsequent_cycles_start": null,
"schedule_settings": {
"start_on": null,
"zone_id": "Asia/Tokyo",
"preserve_end_of_month": null,
"retry_interval": null,
"termination_mode": "immediate"
},
"only_direct_currency": false,
"first_charge_capture_after": null,
"first_charge_authorization_only": false,
"status": "current",
"metadata": {},
"mode": "test",
"created_on": "2024-06-26T00:45:46.447678Z",
"period": "monthly",
"merchant_name": "管理画面ガイド",
"store_name": "管理画面ガイド_TEST店舗",
"payment_type": "card",
"next_payment_date": "2024-07-26",
"user_data": {
"type": "charge",
"cardholder_name": "hanako yamada",
"email": "demo@demo.com",
"brand": "master",
"gateway": null,
"service_provider": null
}
},
<中略>
],
"has_more": true,
"total_hits": 99
}