pokepay_partner_ruby_sdk 0.3.2 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release-pr.yml +18 -0
- data/Gemfile.lock +1 -1
- data/docs/README.md +269 -0
- data/docs/account.md +159 -0
- data/docs/bank_pay.md +235 -0
- data/docs/bill.md +365 -0
- data/docs/bulk.md +121 -0
- data/docs/campaign.md +1749 -0
- data/docs/cashtray.md +318 -0
- data/docs/check.md +883 -0
- data/docs/coupon.md +724 -0
- data/docs/customer.md +1042 -0
- data/docs/error-response.csv +839 -0
- data/docs/event.md +308 -0
- data/docs/index.md +1279 -305
- data/docs/organization.md +292 -0
- data/docs/private_money.md +213 -0
- data/docs/responses.md +711 -0
- data/docs/shop.md +678 -0
- data/docs/transaction.md +2021 -0
- data/docs/transfer.md +686 -0
- data/docs/user.md +3 -0
- data/docs/user_device.md +134 -0
- data/docs/webhook.md +231 -0
- data/lib/pokepay_partner_ruby_sdk/request/activate_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_bank.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_bank_topup_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_coupon.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transaction_with_cashtray.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/delete_webhook.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_check.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_coupon.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk/request/get_external_transaction_by_request_id.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_banks.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_checks.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_organizations.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_check.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_coupon.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/bank.rb +28 -0
- data/lib/pokepay_partner_ruby_sdk/response/bank_registering_info.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/banks.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +6 -0
- data/lib/pokepay_partner_ruby_sdk/response/check.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/external_transaction_detail.rb +34 -0
- data/lib/pokepay_partner_ruby_sdk/response/organization_summary.rb +4 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_checks.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_organizations.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money_summary.rb +4 -0
- data/lib/pokepay_partner_ruby_sdk/response/product.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/user_device.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +26 -4
- data/partner.yaml +1578 -216
- metadata +46 -2
data/docs/transaction.md
ADDED
@@ -0,0 +1,2021 @@
|
|
1
|
+
# Transaction
|
2
|
+
|
3
|
+
<a name="get-cpm-token"></a>
|
4
|
+
## GetCpmToken: CPMトークンの状態取得
|
5
|
+
CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
|
6
|
+
|
7
|
+
```RUBY
|
8
|
+
response = $client.send(Pokepay::Request::GetCpmToken.new(
|
9
|
+
"xlKwOlCibtq2e0nqtXLNIT" # cpm_token: CPMトークン
|
10
|
+
))
|
11
|
+
```
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
### Parameters
|
16
|
+
**`cpm_token`**
|
17
|
+
|
18
|
+
|
19
|
+
CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。
|
20
|
+
|
21
|
+
```json
|
22
|
+
{
|
23
|
+
"type": "string",
|
24
|
+
"minLength": 22,
|
25
|
+
"maxLength": 22
|
26
|
+
}
|
27
|
+
```
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
成功したときは
|
32
|
+
[CpmToken](./responses.md#cpm-token)
|
33
|
+
を返します
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
|
40
|
+
<a name="list-transactions"></a>
|
41
|
+
## ListTransactions: 【廃止】取引履歴を取得する
|
42
|
+
取引一覧を返します。
|
43
|
+
|
44
|
+
```RUBY
|
45
|
+
response = $client.send(Pokepay::Request::ListTransactions.new(
|
46
|
+
from: "2023-05-04T13:08:23.000000Z", # 開始日時
|
47
|
+
to: "2022-11-02T13:06:01.000000Z", # 終了日時
|
48
|
+
page: 1, # ページ番号
|
49
|
+
per_page: 50, # 1ページ分の取引数
|
50
|
+
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
51
|
+
customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
|
52
|
+
customer_name: "太郎", # エンドユーザー名
|
53
|
+
terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
|
54
|
+
transaction_id: "ffmmox8h", # 取引ID
|
55
|
+
organization_code: "pocketchange", # 組織コード
|
56
|
+
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
57
|
+
is_modified: false, # キャンセルフラグ
|
58
|
+
types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
|
59
|
+
description: "店頭QRコードによる支払い" # 取引説明文
|
60
|
+
))
|
61
|
+
```
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
**`from`**
|
67
|
+
|
68
|
+
|
69
|
+
抽出期間の開始日時です。
|
70
|
+
|
71
|
+
フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
|
72
|
+
|
73
|
+
```json
|
74
|
+
{
|
75
|
+
"type": "string",
|
76
|
+
"format": "date-time"
|
77
|
+
}
|
78
|
+
```
|
79
|
+
|
80
|
+
**`to`**
|
81
|
+
|
82
|
+
|
83
|
+
抽出期間の終了日時です。
|
84
|
+
|
85
|
+
フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
|
86
|
+
|
87
|
+
```json
|
88
|
+
{
|
89
|
+
"type": "string",
|
90
|
+
"format": "date-time"
|
91
|
+
}
|
92
|
+
```
|
93
|
+
|
94
|
+
**`page`**
|
95
|
+
|
96
|
+
|
97
|
+
取得したいページ番号です。
|
98
|
+
|
99
|
+
```json
|
100
|
+
{
|
101
|
+
"type": "integer",
|
102
|
+
"minimum": 1
|
103
|
+
}
|
104
|
+
```
|
105
|
+
|
106
|
+
**`per_page`**
|
107
|
+
|
108
|
+
|
109
|
+
1ページ分の取引数です。
|
110
|
+
|
111
|
+
```json
|
112
|
+
{
|
113
|
+
"type": "integer",
|
114
|
+
"minimum": 1
|
115
|
+
}
|
116
|
+
```
|
117
|
+
|
118
|
+
**`shop_id`**
|
119
|
+
|
120
|
+
|
121
|
+
店舗IDです。
|
122
|
+
|
123
|
+
フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
|
124
|
+
|
125
|
+
```json
|
126
|
+
{
|
127
|
+
"type": "string",
|
128
|
+
"format": "uuid"
|
129
|
+
}
|
130
|
+
```
|
131
|
+
|
132
|
+
**`customer_id`**
|
133
|
+
|
134
|
+
|
135
|
+
エンドユーザーIDです。
|
136
|
+
|
137
|
+
フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
|
138
|
+
|
139
|
+
```json
|
140
|
+
{
|
141
|
+
"type": "string",
|
142
|
+
"format": "uuid"
|
143
|
+
}
|
144
|
+
```
|
145
|
+
|
146
|
+
**`customer_name`**
|
147
|
+
|
148
|
+
|
149
|
+
エンドユーザー名です。
|
150
|
+
|
151
|
+
フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
|
152
|
+
|
153
|
+
```json
|
154
|
+
{
|
155
|
+
"type": "string",
|
156
|
+
"maxLength": 256
|
157
|
+
}
|
158
|
+
```
|
159
|
+
|
160
|
+
**`terminal_id`**
|
161
|
+
|
162
|
+
|
163
|
+
端末IDです。
|
164
|
+
|
165
|
+
フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
|
166
|
+
|
167
|
+
```json
|
168
|
+
{
|
169
|
+
"type": "string",
|
170
|
+
"format": "uuid"
|
171
|
+
}
|
172
|
+
```
|
173
|
+
|
174
|
+
**`transaction_id`**
|
175
|
+
|
176
|
+
|
177
|
+
取引IDです。
|
178
|
+
|
179
|
+
フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。
|
180
|
+
|
181
|
+
```json
|
182
|
+
{
|
183
|
+
"type": "string"
|
184
|
+
}
|
185
|
+
```
|
186
|
+
|
187
|
+
**`organization_code`**
|
188
|
+
|
189
|
+
|
190
|
+
組織コードです。
|
191
|
+
|
192
|
+
フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
|
193
|
+
|
194
|
+
```json
|
195
|
+
{
|
196
|
+
"type": "string",
|
197
|
+
"maxLength": 32,
|
198
|
+
"pattern": "^[a-zA-Z0-9-]*$"
|
199
|
+
}
|
200
|
+
```
|
201
|
+
|
202
|
+
**`private_money_id`**
|
203
|
+
|
204
|
+
|
205
|
+
マネーIDです。
|
206
|
+
|
207
|
+
フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
|
208
|
+
|
209
|
+
```json
|
210
|
+
{
|
211
|
+
"type": "string",
|
212
|
+
"format": "uuid"
|
213
|
+
}
|
214
|
+
```
|
215
|
+
|
216
|
+
**`is_modified`**
|
217
|
+
|
218
|
+
|
219
|
+
キャンセルフラグです。
|
220
|
+
|
221
|
+
これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
|
222
|
+
デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
|
223
|
+
|
224
|
+
```json
|
225
|
+
{
|
226
|
+
"type": "boolean"
|
227
|
+
}
|
228
|
+
```
|
229
|
+
|
230
|
+
**`types`**
|
231
|
+
|
232
|
+
|
233
|
+
取引の種類でフィルターします。
|
234
|
+
|
235
|
+
以下の種類を指定できます。
|
236
|
+
|
237
|
+
1. topup
|
238
|
+
店舗からエンドユーザーへの送金取引(チャージ)
|
239
|
+
|
240
|
+
2. payment
|
241
|
+
エンドユーザーから店舗への送金取引(支払い)
|
242
|
+
|
243
|
+
3. exchange-outflow
|
244
|
+
他マネーへの流出
|
245
|
+
|
246
|
+
4. exchange-inflow
|
247
|
+
他マネーからの流入
|
248
|
+
|
249
|
+
5. cashback
|
250
|
+
退会時返金取引
|
251
|
+
|
252
|
+
6. expire
|
253
|
+
退会時失効取引
|
254
|
+
|
255
|
+
```json
|
256
|
+
{
|
257
|
+
"type": "array",
|
258
|
+
"items": {
|
259
|
+
"type": "string",
|
260
|
+
"enum": [
|
261
|
+
"topup",
|
262
|
+
"payment",
|
263
|
+
"exchange_outflow",
|
264
|
+
"exchange_inflow",
|
265
|
+
"cashback",
|
266
|
+
"expire"
|
267
|
+
]
|
268
|
+
}
|
269
|
+
}
|
270
|
+
```
|
271
|
+
|
272
|
+
**`description`**
|
273
|
+
|
274
|
+
|
275
|
+
取引を指定の取引説明文でフィルターします。
|
276
|
+
|
277
|
+
取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。
|
278
|
+
|
279
|
+
```json
|
280
|
+
{
|
281
|
+
"type": "string",
|
282
|
+
"maxLength": 200
|
283
|
+
}
|
284
|
+
```
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
成功したときは
|
289
|
+
[PaginatedTransaction](./responses.md#paginated-transaction)
|
290
|
+
を返します
|
291
|
+
|
292
|
+
### Error Responses
|
293
|
+
|status|type|ja|en|
|
294
|
+
|---|---|---|---|
|
295
|
+
|403|NULL|NULL|NULL|
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
---
|
300
|
+
|
301
|
+
|
302
|
+
<a name="create-transaction"></a>
|
303
|
+
## CreateTransaction: 【廃止】チャージする
|
304
|
+
チャージ取引を作成します。このAPIは廃止予定です。以降は `CreateTopupTransaction` を使用してください。
|
305
|
+
|
306
|
+
```RUBY
|
307
|
+
response = $client.send(Pokepay::Request::CreateTransaction.new(
|
308
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
309
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
310
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
311
|
+
money_amount: 2545,
|
312
|
+
point_amount: 6648,
|
313
|
+
point_expires_at: "2022-02-08T18:32:21.000000Z", # ポイント有効期限
|
314
|
+
description: "x7fQZGPMXFo6oIvZGxUJAAeHeUyg78eCpqwfbVaGI8MUg6pkTJeF4LA5VGWmlO55tLRhXfPthFrTbvP80JDs4TLAvvWwguBec41EmwzzFrgc709a7P9KtTHr3zG8NnPjRfIRrqy3FohrRiHbftN77E9sKP2LWTH"
|
315
|
+
))
|
316
|
+
```
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
### Parameters
|
321
|
+
**`shop_id`**
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
```json
|
326
|
+
{
|
327
|
+
"type": "string",
|
328
|
+
"format": "uuid"
|
329
|
+
}
|
330
|
+
```
|
331
|
+
|
332
|
+
**`customer_id`**
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
```json
|
337
|
+
{
|
338
|
+
"type": "string",
|
339
|
+
"format": "uuid"
|
340
|
+
}
|
341
|
+
```
|
342
|
+
|
343
|
+
**`private_money_id`**
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
```json
|
348
|
+
{
|
349
|
+
"type": "string",
|
350
|
+
"format": "uuid"
|
351
|
+
}
|
352
|
+
```
|
353
|
+
|
354
|
+
**`money_amount`**
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
```json
|
359
|
+
{
|
360
|
+
"type": "integer",
|
361
|
+
"format": "decimal",
|
362
|
+
"minimum": 0
|
363
|
+
}
|
364
|
+
```
|
365
|
+
|
366
|
+
**`point_amount`**
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
```json
|
371
|
+
{
|
372
|
+
"type": "integer",
|
373
|
+
"format": "decimal",
|
374
|
+
"minimum": 0
|
375
|
+
}
|
376
|
+
```
|
377
|
+
|
378
|
+
**`point_expires_at`**
|
379
|
+
|
380
|
+
|
381
|
+
ポイントをチャージした場合の、付与されるポイントの有効期限です。
|
382
|
+
省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
|
383
|
+
|
384
|
+
```json
|
385
|
+
{
|
386
|
+
"type": "string",
|
387
|
+
"format": "date-time"
|
388
|
+
}
|
389
|
+
```
|
390
|
+
|
391
|
+
**`description`**
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
```json
|
396
|
+
{
|
397
|
+
"type": "string",
|
398
|
+
"maxLength": 200
|
399
|
+
}
|
400
|
+
```
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
成功したときは
|
405
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
406
|
+
を返します
|
407
|
+
|
408
|
+
### Error Responses
|
409
|
+
|status|type|ja|en|
|
410
|
+
|---|---|---|---|
|
411
|
+
|400|invalid_parameter_both_point_and_money_are_zero||One of 'money_amount' or 'point_amount' must be a positive (>0) number|
|
412
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
413
|
+
|403|NULL|NULL|NULL|
|
414
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
415
|
+
|422|customer_user_not_found||The customer user is not found|
|
416
|
+
|422|shop_user_not_found|店舗が見つかりません|The shop user is not found|
|
417
|
+
|422|private_money_not_found||Private money not found|
|
418
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
419
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
420
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
421
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
422
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
423
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
424
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
425
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
426
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
427
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
428
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
429
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
430
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
431
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
432
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
433
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
434
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
435
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
436
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
437
|
+
|422|customer_account_not_found||The customer account is not found|
|
438
|
+
|422|shop_account_not_found||The shop account is not found|
|
439
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
440
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
441
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
442
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
443
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
444
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
445
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
446
|
+
|503|temporarily_unavailable||Service Unavailable|
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
---
|
451
|
+
|
452
|
+
|
453
|
+
<a name="list-transactions-v2"></a>
|
454
|
+
## ListTransactionsV2: 取引履歴を取得する
|
455
|
+
取引一覧を返します。
|
456
|
+
|
457
|
+
```RUBY
|
458
|
+
response = $client.send(Pokepay::Request::ListTransactionsV2.new(
|
459
|
+
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
460
|
+
organization_code: "pocketchange", # 組織コード
|
461
|
+
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
462
|
+
terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
|
463
|
+
customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
|
464
|
+
customer_name: "太郎", # エンドユーザー名
|
465
|
+
description: "店頭QRコードによる支払い", # 取引説明文
|
466
|
+
transaction_id: "kv", # 取引ID
|
467
|
+
is_modified: true, # キャンセルフラグ
|
468
|
+
types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
|
469
|
+
from: "2021-07-19T23:53:06.000000Z", # 開始日時
|
470
|
+
to: "2021-01-10T00:16:17.000000Z", # 終了日時
|
471
|
+
next_page_cursor_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 次ページへ遷移する際に起点となるtransactionのID
|
472
|
+
prev_page_cursor_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 前ページへ遷移する際に起点となるtransactionのID
|
473
|
+
per_page: 50 # 1ページ分の取引数
|
474
|
+
))
|
475
|
+
```
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
### Parameters
|
480
|
+
**`private_money_id`**
|
481
|
+
|
482
|
+
|
483
|
+
マネーIDです。
|
484
|
+
|
485
|
+
指定したマネーでの取引が一覧に表示されます。
|
486
|
+
|
487
|
+
```json
|
488
|
+
{
|
489
|
+
"type": "string",
|
490
|
+
"format": "uuid"
|
491
|
+
}
|
492
|
+
```
|
493
|
+
|
494
|
+
**`organization_code`**
|
495
|
+
|
496
|
+
|
497
|
+
組織コードです。
|
498
|
+
|
499
|
+
フィルターとして使われ、指定された組織の店舗での取引のみ一覧に表示されます。
|
500
|
+
|
501
|
+
```json
|
502
|
+
{
|
503
|
+
"type": "string",
|
504
|
+
"maxLength": 32,
|
505
|
+
"pattern": "^[a-zA-Z0-9-]*$"
|
506
|
+
}
|
507
|
+
```
|
508
|
+
|
509
|
+
**`shop_id`**
|
510
|
+
|
511
|
+
|
512
|
+
店舗IDです。
|
513
|
+
|
514
|
+
フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
|
515
|
+
|
516
|
+
```json
|
517
|
+
{
|
518
|
+
"type": "string",
|
519
|
+
"format": "uuid"
|
520
|
+
}
|
521
|
+
```
|
522
|
+
|
523
|
+
**`terminal_id`**
|
524
|
+
|
525
|
+
|
526
|
+
端末IDです。
|
527
|
+
|
528
|
+
フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
|
529
|
+
|
530
|
+
```json
|
531
|
+
{
|
532
|
+
"type": "string",
|
533
|
+
"format": "uuid"
|
534
|
+
}
|
535
|
+
```
|
536
|
+
|
537
|
+
**`customer_id`**
|
538
|
+
|
539
|
+
|
540
|
+
エンドユーザーIDです。
|
541
|
+
|
542
|
+
フィルターとして使われ、指定されたエンドユーザーの取引のみ一覧に表示されます。
|
543
|
+
|
544
|
+
```json
|
545
|
+
{
|
546
|
+
"type": "string",
|
547
|
+
"format": "uuid"
|
548
|
+
}
|
549
|
+
```
|
550
|
+
|
551
|
+
**`customer_name`**
|
552
|
+
|
553
|
+
|
554
|
+
エンドユーザー名です。
|
555
|
+
|
556
|
+
フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
|
557
|
+
|
558
|
+
```json
|
559
|
+
{
|
560
|
+
"type": "string",
|
561
|
+
"maxLength": 256
|
562
|
+
}
|
563
|
+
```
|
564
|
+
|
565
|
+
**`description`**
|
566
|
+
|
567
|
+
|
568
|
+
取引を指定の取引説明文でフィルターします。
|
569
|
+
|
570
|
+
取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。
|
571
|
+
|
572
|
+
```json
|
573
|
+
{
|
574
|
+
"type": "string",
|
575
|
+
"maxLength": 200
|
576
|
+
}
|
577
|
+
```
|
578
|
+
|
579
|
+
**`transaction_id`**
|
580
|
+
|
581
|
+
|
582
|
+
取引IDです。
|
583
|
+
|
584
|
+
フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。
|
585
|
+
|
586
|
+
```json
|
587
|
+
{
|
588
|
+
"type": "string"
|
589
|
+
}
|
590
|
+
```
|
591
|
+
|
592
|
+
**`is_modified`**
|
593
|
+
|
594
|
+
|
595
|
+
キャンセルフラグです。
|
596
|
+
|
597
|
+
これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
|
598
|
+
デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
|
599
|
+
|
600
|
+
```json
|
601
|
+
{
|
602
|
+
"type": "boolean"
|
603
|
+
}
|
604
|
+
```
|
605
|
+
|
606
|
+
**`types`**
|
607
|
+
|
608
|
+
|
609
|
+
取引の種類でフィルターします。
|
610
|
+
|
611
|
+
以下の種類を指定できます。
|
612
|
+
|
613
|
+
1. topup
|
614
|
+
店舗からエンドユーザーへの送金取引(チャージ)
|
615
|
+
|
616
|
+
2. payment
|
617
|
+
エンドユーザーから店舗への送金取引(支払い)
|
618
|
+
|
619
|
+
3. exchange-outflow
|
620
|
+
他マネーへの流出
|
621
|
+
private_money_idが指定されたとき、そのマネーから見て流出方向の交換取引が抽出されます。
|
622
|
+
private_money_idを省略した場合は表示されません。
|
623
|
+
|
624
|
+
4. exchange-inflow
|
625
|
+
他マネーからの流入
|
626
|
+
private_money_idが指定されたとき、そのマネーから見て流入方向の交換取引が抽出されます。
|
627
|
+
private_money_idを省略した場合は表示されません。
|
628
|
+
|
629
|
+
5. cashback
|
630
|
+
退会時返金取引
|
631
|
+
|
632
|
+
6. expire
|
633
|
+
退会時失効取引
|
634
|
+
|
635
|
+
```json
|
636
|
+
{
|
637
|
+
"type": "array",
|
638
|
+
"items": {
|
639
|
+
"type": "string",
|
640
|
+
"enum": [
|
641
|
+
"topup",
|
642
|
+
"payment",
|
643
|
+
"exchange_outflow",
|
644
|
+
"exchange_inflow",
|
645
|
+
"cashback",
|
646
|
+
"expire"
|
647
|
+
]
|
648
|
+
}
|
649
|
+
}
|
650
|
+
```
|
651
|
+
|
652
|
+
**`from`**
|
653
|
+
|
654
|
+
|
655
|
+
抽出期間の開始日時です。
|
656
|
+
|
657
|
+
フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
|
658
|
+
|
659
|
+
```json
|
660
|
+
{
|
661
|
+
"type": "string",
|
662
|
+
"format": "date-time"
|
663
|
+
}
|
664
|
+
```
|
665
|
+
|
666
|
+
**`to`**
|
667
|
+
|
668
|
+
|
669
|
+
抽出期間の終了日時です。
|
670
|
+
|
671
|
+
フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
|
672
|
+
|
673
|
+
```json
|
674
|
+
{
|
675
|
+
"type": "string",
|
676
|
+
"format": "date-time"
|
677
|
+
}
|
678
|
+
```
|
679
|
+
|
680
|
+
**`next_page_cursor_id`**
|
681
|
+
|
682
|
+
|
683
|
+
次ページへ遷移する際に起点となるtransactionのID(前ページの末尾要素のID)です。
|
684
|
+
本APIのレスポンスにもnext_page_cursor_idが含まれており、これがnull値の場合は最後のページであることを意味します。
|
685
|
+
UUIDである場合は次のページが存在することを意味し、このnext_page_cursor_idをリクエストパラメータに含めることで次ページに遷移します。
|
686
|
+
|
687
|
+
next_page_cursor_idのtransaction自体は次のページには含まれません。
|
688
|
+
|
689
|
+
```json
|
690
|
+
{
|
691
|
+
"type": "string",
|
692
|
+
"format": "uuid"
|
693
|
+
}
|
694
|
+
```
|
695
|
+
|
696
|
+
**`prev_page_cursor_id`**
|
697
|
+
|
698
|
+
|
699
|
+
前ページへ遷移する際に起点となるtransactionのID(次ページの先頭要素のID)です。
|
700
|
+
|
701
|
+
本APIのレスポンスにもprev_page_cursor_idが含まれており、これがnull値の場合は先頭のページであることを意味します。
|
702
|
+
UUIDである場合は前のページが存在することを意味し、このprev_page_cursor_idをリクエストパラメータに含めることで前ページに遷移します。
|
703
|
+
|
704
|
+
prev_page_cursor_idのtransaction自体は前のページには含まれません。
|
705
|
+
|
706
|
+
```json
|
707
|
+
{
|
708
|
+
"type": "string",
|
709
|
+
"format": "uuid"
|
710
|
+
}
|
711
|
+
```
|
712
|
+
|
713
|
+
**`per_page`**
|
714
|
+
|
715
|
+
|
716
|
+
1ページ分の取引数です。
|
717
|
+
|
718
|
+
デフォルト値は50です。
|
719
|
+
|
720
|
+
```json
|
721
|
+
{
|
722
|
+
"type": "integer",
|
723
|
+
"minimum": 1,
|
724
|
+
"maximum": 1000
|
725
|
+
}
|
726
|
+
```
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
成功したときは
|
731
|
+
[PaginatedTransactionV2](./responses.md#paginated-transaction-v2)
|
732
|
+
を返します
|
733
|
+
|
734
|
+
### Error Responses
|
735
|
+
|status|type|ja|en|
|
736
|
+
|---|---|---|---|
|
737
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
---
|
742
|
+
|
743
|
+
|
744
|
+
<a name="create-topup-transaction"></a>
|
745
|
+
## CreateTopupTransaction: チャージする
|
746
|
+
チャージ取引を作成します。
|
747
|
+
|
748
|
+
```RUBY
|
749
|
+
response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
750
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
751
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
|
752
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
753
|
+
bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
|
754
|
+
money_amount: 3094, # マネー額
|
755
|
+
point_amount: 4032, # ポイント額
|
756
|
+
point_expires_at: "2023-05-22T22:55:16.000000Z", # ポイント有効期限
|
757
|
+
description: "初夏のチャージキャンペーン", # 取引履歴に表示する説明文
|
758
|
+
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
759
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
760
|
+
))
|
761
|
+
```
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
### Parameters
|
766
|
+
**`shop_id`**
|
767
|
+
|
768
|
+
|
769
|
+
店舗IDです。
|
770
|
+
|
771
|
+
送金元の店舗を指定します。
|
772
|
+
|
773
|
+
```json
|
774
|
+
{
|
775
|
+
"type": "string",
|
776
|
+
"format": "uuid"
|
777
|
+
}
|
778
|
+
```
|
779
|
+
|
780
|
+
**`customer_id`**
|
781
|
+
|
782
|
+
|
783
|
+
エンドユーザーIDです。
|
784
|
+
|
785
|
+
送金先のエンドユーザーを指定します。
|
786
|
+
|
787
|
+
```json
|
788
|
+
{
|
789
|
+
"type": "string",
|
790
|
+
"format": "uuid"
|
791
|
+
}
|
792
|
+
```
|
793
|
+
|
794
|
+
**`private_money_id`**
|
795
|
+
|
796
|
+
|
797
|
+
マネーIDです。
|
798
|
+
|
799
|
+
マネーを指定します。
|
800
|
+
|
801
|
+
```json
|
802
|
+
{
|
803
|
+
"type": "string",
|
804
|
+
"format": "uuid"
|
805
|
+
}
|
806
|
+
```
|
807
|
+
|
808
|
+
**`bear_point_shop_id`**
|
809
|
+
|
810
|
+
|
811
|
+
ポイント支払時の負担店舗IDです。
|
812
|
+
|
813
|
+
ポイント支払い時に実際お金を負担する店舗を指定します。
|
814
|
+
|
815
|
+
```json
|
816
|
+
{
|
817
|
+
"type": "string",
|
818
|
+
"format": "uuid"
|
819
|
+
}
|
820
|
+
```
|
821
|
+
|
822
|
+
**`money_amount`**
|
823
|
+
|
824
|
+
|
825
|
+
マネー額です。
|
826
|
+
|
827
|
+
送金するマネー額を指定します。
|
828
|
+
デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
|
829
|
+
|
830
|
+
```json
|
831
|
+
{
|
832
|
+
"type": "integer",
|
833
|
+
"minimum": 0
|
834
|
+
}
|
835
|
+
```
|
836
|
+
|
837
|
+
**`point_amount`**
|
838
|
+
|
839
|
+
|
840
|
+
ポイント額です。
|
841
|
+
|
842
|
+
送金するポイント額を指定します。
|
843
|
+
デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
|
844
|
+
|
845
|
+
```json
|
846
|
+
{
|
847
|
+
"type": "integer",
|
848
|
+
"minimum": 0
|
849
|
+
}
|
850
|
+
```
|
851
|
+
|
852
|
+
**`point_expires_at`**
|
853
|
+
|
854
|
+
|
855
|
+
ポイントをチャージした場合の、付与されるポイントの有効期限です。
|
856
|
+
省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
|
857
|
+
|
858
|
+
```json
|
859
|
+
{
|
860
|
+
"type": "string",
|
861
|
+
"format": "date-time"
|
862
|
+
}
|
863
|
+
```
|
864
|
+
|
865
|
+
**`description`**
|
866
|
+
|
867
|
+
|
868
|
+
取引説明文です。
|
869
|
+
|
870
|
+
任意入力で、取引履歴に表示される説明文です。
|
871
|
+
|
872
|
+
```json
|
873
|
+
{
|
874
|
+
"type": "string",
|
875
|
+
"maxLength": 200
|
876
|
+
}
|
877
|
+
```
|
878
|
+
|
879
|
+
**`metadata`**
|
880
|
+
|
881
|
+
|
882
|
+
取引作成時に指定されるメタデータです。
|
883
|
+
|
884
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
885
|
+
|
886
|
+
```json
|
887
|
+
{
|
888
|
+
"type": "string",
|
889
|
+
"format": "json"
|
890
|
+
}
|
891
|
+
```
|
892
|
+
|
893
|
+
**`request_id`**
|
894
|
+
|
895
|
+
|
896
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
897
|
+
|
898
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
899
|
+
|
900
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
901
|
+
|
902
|
+
```json
|
903
|
+
{
|
904
|
+
"type": "string",
|
905
|
+
"format": "uuid"
|
906
|
+
}
|
907
|
+
```
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
成功したときは
|
912
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
913
|
+
を返します
|
914
|
+
|
915
|
+
### Error Responses
|
916
|
+
|status|type|ja|en|
|
917
|
+
|---|---|---|---|
|
918
|
+
|400|invalid_parameter_both_point_and_money_are_zero||One of 'money_amount' or 'point_amount' must be a positive (>0) number|
|
919
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
920
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
921
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
922
|
+
|422|invalid_metadata|メタデータの形式が不正です|Invalid metadata format|
|
923
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
924
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
925
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
926
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
927
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
928
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
929
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
930
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
931
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
932
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
933
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
934
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
935
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
936
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
937
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
938
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
939
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
940
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
941
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
942
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
943
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
944
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
945
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
946
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
947
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
948
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
949
|
+
|422|customer_account_not_found||The customer account is not found|
|
950
|
+
|422|shop_account_not_found||The shop account is not found|
|
951
|
+
|422|private_money_not_found||Private money not found|
|
952
|
+
|503|temporarily_unavailable||Service Unavailable|
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
---
|
957
|
+
|
958
|
+
|
959
|
+
<a name="create-payment-transaction"></a>
|
960
|
+
## CreatePaymentTransaction: 支払いする
|
961
|
+
支払取引を作成します。
|
962
|
+
支払い時には、エンドユーザーの残高のうち、ポイント残高から優先的に消費されます。
|
963
|
+
|
964
|
+
|
965
|
+
```RUBY
|
966
|
+
response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
967
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
968
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
969
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
970
|
+
9195, # amount: 支払い額
|
971
|
+
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
972
|
+
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
973
|
+
products: [{"jan_code":"abc",
|
974
|
+
"name":"name1",
|
975
|
+
"unit_price":100,
|
976
|
+
"price": 100,
|
977
|
+
"quantity": 1,
|
978
|
+
"is_discounted": false,
|
979
|
+
"other":"{}"}, {"jan_code":"abc",
|
980
|
+
"name":"name1",
|
981
|
+
"unit_price":100,
|
982
|
+
"price": 100,
|
983
|
+
"quantity": 1,
|
984
|
+
"is_discounted": false,
|
985
|
+
"other":"{}"}], # 商品情報データ
|
986
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # リクエストID
|
987
|
+
strategy: "point-preferred" # 支払い時の残高消費方式
|
988
|
+
))
|
989
|
+
```
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
### Parameters
|
994
|
+
**`shop_id`**
|
995
|
+
|
996
|
+
|
997
|
+
店舗IDです。
|
998
|
+
|
999
|
+
送金先の店舗を指定します。
|
1000
|
+
|
1001
|
+
```json
|
1002
|
+
{
|
1003
|
+
"type": "string",
|
1004
|
+
"format": "uuid"
|
1005
|
+
}
|
1006
|
+
```
|
1007
|
+
|
1008
|
+
**`customer_id`**
|
1009
|
+
|
1010
|
+
|
1011
|
+
エンドユーザーIDです。
|
1012
|
+
|
1013
|
+
送金元のエンドユーザーを指定します。
|
1014
|
+
|
1015
|
+
```json
|
1016
|
+
{
|
1017
|
+
"type": "string",
|
1018
|
+
"format": "uuid"
|
1019
|
+
}
|
1020
|
+
```
|
1021
|
+
|
1022
|
+
**`private_money_id`**
|
1023
|
+
|
1024
|
+
|
1025
|
+
マネーIDです。
|
1026
|
+
|
1027
|
+
マネーを指定します。
|
1028
|
+
|
1029
|
+
```json
|
1030
|
+
{
|
1031
|
+
"type": "string",
|
1032
|
+
"format": "uuid"
|
1033
|
+
}
|
1034
|
+
```
|
1035
|
+
|
1036
|
+
**`amount`**
|
1037
|
+
|
1038
|
+
|
1039
|
+
マネー額です。
|
1040
|
+
|
1041
|
+
送金するマネー額を指定します。
|
1042
|
+
|
1043
|
+
```json
|
1044
|
+
{
|
1045
|
+
"type": "integer",
|
1046
|
+
"minimum": 0
|
1047
|
+
}
|
1048
|
+
```
|
1049
|
+
|
1050
|
+
**`description`**
|
1051
|
+
|
1052
|
+
|
1053
|
+
取引説明文です。
|
1054
|
+
|
1055
|
+
任意入力で、取引履歴に表示される説明文です。
|
1056
|
+
|
1057
|
+
```json
|
1058
|
+
{
|
1059
|
+
"type": "string",
|
1060
|
+
"maxLength": 200
|
1061
|
+
}
|
1062
|
+
```
|
1063
|
+
|
1064
|
+
**`metadata`**
|
1065
|
+
|
1066
|
+
|
1067
|
+
取引作成時に指定されるメタデータです。
|
1068
|
+
|
1069
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
1070
|
+
|
1071
|
+
```json
|
1072
|
+
{
|
1073
|
+
"type": "string",
|
1074
|
+
"format": "json"
|
1075
|
+
}
|
1076
|
+
```
|
1077
|
+
|
1078
|
+
**`products`**
|
1079
|
+
|
1080
|
+
|
1081
|
+
一つの取引に含まれる商品情報データです。
|
1082
|
+
以下の内容からなるJSONオブジェクトの配列で指定します。
|
1083
|
+
|
1084
|
+
- `jan_code`: JANコード。64字以下の文字列
|
1085
|
+
- `name`: 商品名。256字以下の文字列
|
1086
|
+
- `unit_price`: 商品単価。0以上の数値
|
1087
|
+
- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
|
1088
|
+
- `quantity`: 商品の個数。この値が指定された場合、priceから算出される個数よりも優先されます。
|
1089
|
+
- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
|
1090
|
+
- `other`: その他商品に関する情報。JSONオブジェクトで指定します。
|
1091
|
+
|
1092
|
+
```json
|
1093
|
+
{
|
1094
|
+
"type": "array",
|
1095
|
+
"items": {
|
1096
|
+
"type": "object"
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
```
|
1100
|
+
|
1101
|
+
**`request_id`**
|
1102
|
+
|
1103
|
+
|
1104
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
1105
|
+
|
1106
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
1107
|
+
|
1108
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
1109
|
+
|
1110
|
+
```json
|
1111
|
+
{
|
1112
|
+
"type": "string",
|
1113
|
+
"format": "uuid"
|
1114
|
+
}
|
1115
|
+
```
|
1116
|
+
|
1117
|
+
**`strategy`**
|
1118
|
+
|
1119
|
+
|
1120
|
+
支払い時に残高がどのように消費されるかを指定します。
|
1121
|
+
デフォルトでは point-preferred (ポイント優先)が採用されます。
|
1122
|
+
|
1123
|
+
- point-preferred: ポイント残高が優先的に消費され、ポイントがなくなり次第マネー残高から消費されていきます(デフォルト動作)
|
1124
|
+
- money-only: マネー残高のみから消費され、ポイント残高は使われません
|
1125
|
+
|
1126
|
+
マネー設定でポイント残高のみの利用に設定されている場合(display_money_and_point が point-only の場合)、 strategy の指定に関わらずポイント優先になります。
|
1127
|
+
|
1128
|
+
```json
|
1129
|
+
{
|
1130
|
+
"type": "string",
|
1131
|
+
"enum": [
|
1132
|
+
"point-preferred",
|
1133
|
+
"money-only"
|
1134
|
+
]
|
1135
|
+
}
|
1136
|
+
```
|
1137
|
+
|
1138
|
+
|
1139
|
+
|
1140
|
+
成功したときは
|
1141
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1142
|
+
を返します
|
1143
|
+
|
1144
|
+
### Error Responses
|
1145
|
+
|status|type|ja|en|
|
1146
|
+
|---|---|---|---|
|
1147
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
1148
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
1149
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
1150
|
+
|422|invalid_metadata|メタデータの形式が不正です|Invalid metadata format|
|
1151
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
1152
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
1153
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
1154
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
1155
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
1156
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
1157
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
1158
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
1159
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1160
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1161
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
1162
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
1163
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
1164
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
1165
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
1166
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
1167
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
1168
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
1169
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
1170
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
1171
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
1172
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
1173
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
1174
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
1175
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
1176
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
1177
|
+
|422|customer_account_not_found||The customer account is not found|
|
1178
|
+
|422|shop_account_not_found||The shop account is not found|
|
1179
|
+
|422|private_money_not_found||Private money not found|
|
1180
|
+
|503|temporarily_unavailable||Service Unavailable|
|
1181
|
+
|
1182
|
+
|
1183
|
+
|
1184
|
+
---
|
1185
|
+
|
1186
|
+
|
1187
|
+
<a name="create-cpm-transaction"></a>
|
1188
|
+
## CreateCpmTransaction: CPMトークンによる取引作成
|
1189
|
+
CPMトークンにより取引を作成します。
|
1190
|
+
CPMトークンに設定されたスコープの取引を作ることができます。
|
1191
|
+
|
1192
|
+
|
1193
|
+
```RUBY
|
1194
|
+
response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
|
1195
|
+
"fSmGSFmTTeLGAy7h6m0Yya", # cpm_token: CPMトークン
|
1196
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
1197
|
+
1318.0, # amount: 取引金額
|
1198
|
+
description: "たい焼き(小倉)", # 取引説明文
|
1199
|
+
metadata: "{\"key\":\"value\"}", # 店舗側メタデータ
|
1200
|
+
products: [{"jan_code":"abc",
|
1201
|
+
"name":"name1",
|
1202
|
+
"unit_price":100,
|
1203
|
+
"price": 100,
|
1204
|
+
"quantity": 1,
|
1205
|
+
"is_discounted": false,
|
1206
|
+
"other":"{}"}], # 商品情報データ
|
1207
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # リクエストID
|
1208
|
+
strategy: "point-preferred" # 支払い時の残高消費方式
|
1209
|
+
))
|
1210
|
+
```
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
### Parameters
|
1215
|
+
**`cpm_token`**
|
1216
|
+
|
1217
|
+
|
1218
|
+
エンドユーザーによって作られ、アプリなどに表示され、店舗に対して提示される22桁の文字列です。
|
1219
|
+
|
1220
|
+
エンドユーザーによって許可された取引のスコープを持っています。
|
1221
|
+
|
1222
|
+
```json
|
1223
|
+
{
|
1224
|
+
"type": "string",
|
1225
|
+
"minLength": 22,
|
1226
|
+
"maxLength": 22
|
1227
|
+
}
|
1228
|
+
```
|
1229
|
+
|
1230
|
+
**`shop_id`**
|
1231
|
+
|
1232
|
+
|
1233
|
+
店舗IDです。
|
1234
|
+
|
1235
|
+
支払いやチャージを行う店舗を指定します。
|
1236
|
+
|
1237
|
+
```json
|
1238
|
+
{
|
1239
|
+
"type": "string",
|
1240
|
+
"format": "uuid"
|
1241
|
+
}
|
1242
|
+
```
|
1243
|
+
|
1244
|
+
**`amount`**
|
1245
|
+
|
1246
|
+
|
1247
|
+
取引金額を指定します。
|
1248
|
+
|
1249
|
+
正の値を与えるとチャージになり、負の値を与えると支払いとなります。
|
1250
|
+
|
1251
|
+
```json
|
1252
|
+
{
|
1253
|
+
"type": "number"
|
1254
|
+
}
|
1255
|
+
```
|
1256
|
+
|
1257
|
+
**`description`**
|
1258
|
+
|
1259
|
+
|
1260
|
+
取引説明文です。
|
1261
|
+
|
1262
|
+
エンドユーザーアプリの取引履歴などに表示されます。
|
1263
|
+
|
1264
|
+
```json
|
1265
|
+
{
|
1266
|
+
"type": "string",
|
1267
|
+
"maxLength": 200
|
1268
|
+
}
|
1269
|
+
```
|
1270
|
+
|
1271
|
+
**`metadata`**
|
1272
|
+
|
1273
|
+
|
1274
|
+
取引作成時に店舗側から指定されるメタデータです。
|
1275
|
+
|
1276
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
1277
|
+
|
1278
|
+
```json
|
1279
|
+
{
|
1280
|
+
"type": "string",
|
1281
|
+
"format": "json"
|
1282
|
+
}
|
1283
|
+
```
|
1284
|
+
|
1285
|
+
**`products`**
|
1286
|
+
|
1287
|
+
|
1288
|
+
一つの取引に含まれる商品情報データです。
|
1289
|
+
以下の内容からなるJSONオブジェクトの配列で指定します。
|
1290
|
+
|
1291
|
+
- `jan_code`: JANコード。64字以下の文字列
|
1292
|
+
- `name`: 商品名。256字以下の文字列
|
1293
|
+
- `unit_price`: 商品単価。0以上の数値
|
1294
|
+
- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
|
1295
|
+
- `quantity`: 商品の個数。この値が指定された場合、priceから算出される個数よりも優先されます。
|
1296
|
+
- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
|
1297
|
+
- `other`: その他商品に関する情報。JSONオブジェクトで指定します。
|
1298
|
+
|
1299
|
+
```json
|
1300
|
+
{
|
1301
|
+
"type": "array",
|
1302
|
+
"items": {
|
1303
|
+
"type": "object"
|
1304
|
+
}
|
1305
|
+
}
|
1306
|
+
```
|
1307
|
+
|
1308
|
+
**`request_id`**
|
1309
|
+
|
1310
|
+
|
1311
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
1312
|
+
|
1313
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
1314
|
+
|
1315
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
1316
|
+
|
1317
|
+
```json
|
1318
|
+
{
|
1319
|
+
"type": "string",
|
1320
|
+
"format": "uuid"
|
1321
|
+
}
|
1322
|
+
```
|
1323
|
+
|
1324
|
+
**`strategy`**
|
1325
|
+
|
1326
|
+
|
1327
|
+
支払い時に残高がどのように消費されるかを指定します。
|
1328
|
+
デフォルトでは point-preferred (ポイント優先)が採用されます。
|
1329
|
+
|
1330
|
+
- point-preferred: ポイント残高が優先的に消費され、ポイントがなくなり次第マネー残高から消費されていきます(デフォルト動作)
|
1331
|
+
- money-only: マネー残高のみから消費され、ポイント残高は使われません
|
1332
|
+
|
1333
|
+
マネー設定でポイント残高のみの利用に設定されている場合(display_money_and_point が point-only の場合)、 strategy の指定に関わらずポイント優先になります。
|
1334
|
+
|
1335
|
+
```json
|
1336
|
+
{
|
1337
|
+
"type": "string",
|
1338
|
+
"enum": [
|
1339
|
+
"point-preferred",
|
1340
|
+
"money-only"
|
1341
|
+
]
|
1342
|
+
}
|
1343
|
+
```
|
1344
|
+
|
1345
|
+
|
1346
|
+
|
1347
|
+
成功したときは
|
1348
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1349
|
+
を返します
|
1350
|
+
|
1351
|
+
### Error Responses
|
1352
|
+
|status|type|ja|en|
|
1353
|
+
|---|---|---|---|
|
1354
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
1355
|
+
|403|cpm_unacceptable_amount|このCPMトークンに対して許可されていない金額です。|The amount is unacceptable for the CPM token|
|
1356
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
1357
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
1358
|
+
|422|shop_user_not_found|店舗が見つかりません|The shop user is not found|
|
1359
|
+
|422|private_money_not_found||Private money not found|
|
1360
|
+
|422|cpm_token_already_proceed|このCPMトークンは既に処理されています。|The CPM token is already proceed|
|
1361
|
+
|422|cpm_token_already_expired|このCPMトークンは既に失効しています。|The CPM token is already expired|
|
1362
|
+
|422|cpm_token_not_found|CPMトークンが見つかりませんでした。|The CPM token is not found.|
|
1363
|
+
|422|invalid_metadata|メタデータの形式が不正です|Invalid metadata format|
|
1364
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
1365
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
1366
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
1367
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
1368
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
1369
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
1370
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
1371
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
1372
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1373
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1374
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
1375
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
1376
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
1377
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
1378
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
1379
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
1380
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
1381
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
1382
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
1383
|
+
|422|customer_account_not_found||The customer account is not found|
|
1384
|
+
|422|shop_account_not_found||The shop account is not found|
|
1385
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
1386
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
1387
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
1388
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
1389
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
1390
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
1391
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
1392
|
+
|503|temporarily_unavailable||Service Unavailable|
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
---
|
1397
|
+
|
1398
|
+
|
1399
|
+
<a name="create-transfer-transaction"></a>
|
1400
|
+
## CreateTransferTransaction: 個人間送金
|
1401
|
+
エンドユーザー間での送金取引(個人間送金)を作成します。
|
1402
|
+
個人間送金で送れるのはマネーのみで、ポイントを送ることはできません。送金元のマネー残高のうち、有効期限が最も遠いものから順に送金されます。
|
1403
|
+
|
1404
|
+
|
1405
|
+
```RUBY
|
1406
|
+
response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
|
1407
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
|
1408
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
|
1409
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1410
|
+
1859.0, # amount: 送金額
|
1411
|
+
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
1412
|
+
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
1413
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
1414
|
+
))
|
1415
|
+
```
|
1416
|
+
|
1417
|
+
|
1418
|
+
|
1419
|
+
### Parameters
|
1420
|
+
**`sender_id`**
|
1421
|
+
|
1422
|
+
|
1423
|
+
エンドユーザーIDです。
|
1424
|
+
|
1425
|
+
送金元のエンドユーザー(送り主)を指定します。
|
1426
|
+
|
1427
|
+
```json
|
1428
|
+
{
|
1429
|
+
"type": "string",
|
1430
|
+
"format": "uuid"
|
1431
|
+
}
|
1432
|
+
```
|
1433
|
+
|
1434
|
+
**`receiver_id`**
|
1435
|
+
|
1436
|
+
|
1437
|
+
エンドユーザーIDです。
|
1438
|
+
|
1439
|
+
送金先のエンドユーザー(受け取り人)を指定します。
|
1440
|
+
|
1441
|
+
```json
|
1442
|
+
{
|
1443
|
+
"type": "string",
|
1444
|
+
"format": "uuid"
|
1445
|
+
}
|
1446
|
+
```
|
1447
|
+
|
1448
|
+
**`private_money_id`**
|
1449
|
+
|
1450
|
+
|
1451
|
+
マネーIDです。
|
1452
|
+
|
1453
|
+
マネーを指定します。
|
1454
|
+
|
1455
|
+
```json
|
1456
|
+
{
|
1457
|
+
"type": "string",
|
1458
|
+
"format": "uuid"
|
1459
|
+
}
|
1460
|
+
```
|
1461
|
+
|
1462
|
+
**`amount`**
|
1463
|
+
|
1464
|
+
|
1465
|
+
マネー額です。
|
1466
|
+
|
1467
|
+
送金するマネー額を指定します。
|
1468
|
+
|
1469
|
+
```json
|
1470
|
+
{
|
1471
|
+
"type": "number",
|
1472
|
+
"minimum": 0
|
1473
|
+
}
|
1474
|
+
```
|
1475
|
+
|
1476
|
+
**`metadata`**
|
1477
|
+
|
1478
|
+
|
1479
|
+
取引作成時に指定されるメタデータです。
|
1480
|
+
|
1481
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
1482
|
+
|
1483
|
+
```json
|
1484
|
+
{
|
1485
|
+
"type": "string",
|
1486
|
+
"format": "json"
|
1487
|
+
}
|
1488
|
+
```
|
1489
|
+
|
1490
|
+
**`description`**
|
1491
|
+
|
1492
|
+
|
1493
|
+
取引説明文です。
|
1494
|
+
|
1495
|
+
任意入力で、取引履歴に表示される説明文です。
|
1496
|
+
|
1497
|
+
```json
|
1498
|
+
{
|
1499
|
+
"type": "string",
|
1500
|
+
"maxLength": 200
|
1501
|
+
}
|
1502
|
+
```
|
1503
|
+
|
1504
|
+
**`request_id`**
|
1505
|
+
|
1506
|
+
|
1507
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
1508
|
+
|
1509
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
1510
|
+
|
1511
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
1512
|
+
|
1513
|
+
```json
|
1514
|
+
{
|
1515
|
+
"type": "string",
|
1516
|
+
"format": "uuid"
|
1517
|
+
}
|
1518
|
+
```
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1522
|
+
成功したときは
|
1523
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1524
|
+
を返します
|
1525
|
+
|
1526
|
+
### Error Responses
|
1527
|
+
|status|type|ja|en|
|
1528
|
+
|---|---|---|---|
|
1529
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
1530
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
1531
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
1532
|
+
|422|customer_user_not_found||The customer user is not found|
|
1533
|
+
|422|private_money_not_found||Private money not found|
|
1534
|
+
|422|invalid_metadata|メタデータの形式が不正です|Invalid metadata format|
|
1535
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
1536
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
1537
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
1538
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
1539
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
1540
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
1541
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
1542
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
1543
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1544
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1545
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
1546
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
1547
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
1548
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
1549
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
1550
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
1551
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
1552
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
1553
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
1554
|
+
|422|customer_account_not_found||The customer account is not found|
|
1555
|
+
|422|shop_account_not_found||The shop account is not found|
|
1556
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
1557
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
1558
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
1559
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
1560
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
1561
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
1562
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
1563
|
+
|503|temporarily_unavailable||Service Unavailable|
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
---
|
1568
|
+
|
1569
|
+
|
1570
|
+
<a name="create-exchange-transaction"></a>
|
1571
|
+
## CreateExchangeTransaction
|
1572
|
+
|
1573
|
+
```RUBY
|
1574
|
+
response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
|
1575
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1576
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1577
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1578
|
+
1951,
|
1579
|
+
description: "0Ij3N9K7EVH4f0IDf80jI5hMMqGagepFcb0C3pMehBLw9uhZslxpk65zsLMOaWLvqiZty5Zp232IvDDPPtMusem1WSPOdAkWLCHhP7q7jyjEo8V3Di9DtzhzAGKUtsDdhPal5eEvQkTNVI1DbDv2ICSa1fLqeRzwnNnU8Hy7seU6TP",
|
1580
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
1581
|
+
))
|
1582
|
+
```
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
### Parameters
|
1587
|
+
**`user_id`**
|
1588
|
+
|
1589
|
+
|
1590
|
+
|
1591
|
+
```json
|
1592
|
+
{
|
1593
|
+
"type": "string",
|
1594
|
+
"format": "uuid"
|
1595
|
+
}
|
1596
|
+
```
|
1597
|
+
|
1598
|
+
**`sender_private_money_id`**
|
1599
|
+
|
1600
|
+
|
1601
|
+
|
1602
|
+
```json
|
1603
|
+
{
|
1604
|
+
"type": "string",
|
1605
|
+
"format": "uuid"
|
1606
|
+
}
|
1607
|
+
```
|
1608
|
+
|
1609
|
+
**`receiver_private_money_id`**
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
```json
|
1614
|
+
{
|
1615
|
+
"type": "string",
|
1616
|
+
"format": "uuid"
|
1617
|
+
}
|
1618
|
+
```
|
1619
|
+
|
1620
|
+
**`amount`**
|
1621
|
+
|
1622
|
+
|
1623
|
+
|
1624
|
+
```json
|
1625
|
+
{
|
1626
|
+
"type": "integer",
|
1627
|
+
"minimum": 1
|
1628
|
+
}
|
1629
|
+
```
|
1630
|
+
|
1631
|
+
**`description`**
|
1632
|
+
|
1633
|
+
|
1634
|
+
|
1635
|
+
```json
|
1636
|
+
{
|
1637
|
+
"type": "string",
|
1638
|
+
"maxLength": 200
|
1639
|
+
}
|
1640
|
+
```
|
1641
|
+
|
1642
|
+
**`request_id`**
|
1643
|
+
|
1644
|
+
|
1645
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
1646
|
+
|
1647
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
1648
|
+
|
1649
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
1650
|
+
|
1651
|
+
```json
|
1652
|
+
{
|
1653
|
+
"type": "string",
|
1654
|
+
"format": "uuid"
|
1655
|
+
}
|
1656
|
+
```
|
1657
|
+
|
1658
|
+
|
1659
|
+
|
1660
|
+
成功したときは
|
1661
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1662
|
+
を返します
|
1663
|
+
|
1664
|
+
### Error Responses
|
1665
|
+
|status|type|ja|en|
|
1666
|
+
|---|---|---|---|
|
1667
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
1668
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
1669
|
+
|422|account_not_found|アカウントが見つかりません|The account is not found|
|
1670
|
+
|422|transaction_restricted||Transaction is not allowed|
|
1671
|
+
|422|can_not_exchange_between_same_private_money|同じマネーとの交換はできません||
|
1672
|
+
|422|can_not_exchange_between_users|異なるユーザー間での交換は出来ません||
|
1673
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
1674
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
1675
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
1676
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
1677
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
1678
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
1679
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
1680
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
1681
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
1682
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
1683
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
1684
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
1685
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
1686
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
1687
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1688
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
1689
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
1690
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
1691
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
1692
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
1693
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
1694
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
1695
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
1696
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
1697
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
1698
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
1699
|
+
|503|temporarily_unavailable||Service Unavailable|
|
1700
|
+
|
1701
|
+
|
1702
|
+
|
1703
|
+
---
|
1704
|
+
|
1705
|
+
|
1706
|
+
<a name="get-transaction"></a>
|
1707
|
+
## GetTransaction: 取引情報を取得する
|
1708
|
+
取引を取得します。
|
1709
|
+
|
1710
|
+
```RUBY
|
1711
|
+
response = $client.send(Pokepay::Request::GetTransaction.new(
|
1712
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # transaction_id: 取引ID
|
1713
|
+
))
|
1714
|
+
```
|
1715
|
+
|
1716
|
+
|
1717
|
+
|
1718
|
+
### Parameters
|
1719
|
+
**`transaction_id`**
|
1720
|
+
|
1721
|
+
|
1722
|
+
取引IDです。
|
1723
|
+
|
1724
|
+
フィルターとして使われ、指定した取引IDの取引を取得します。
|
1725
|
+
|
1726
|
+
```json
|
1727
|
+
{
|
1728
|
+
"type": "string",
|
1729
|
+
"format": "uuid"
|
1730
|
+
}
|
1731
|
+
```
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1735
|
+
成功したときは
|
1736
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1737
|
+
を返します
|
1738
|
+
|
1739
|
+
|
1740
|
+
|
1741
|
+
---
|
1742
|
+
|
1743
|
+
|
1744
|
+
<a name="refund-transaction"></a>
|
1745
|
+
## RefundTransaction: 取引をキャンセルする
|
1746
|
+
取引IDを指定して取引をキャンセルします。
|
1747
|
+
|
1748
|
+
発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
|
1749
|
+
キャンセル対象の取引に付随するポイント還元キャンペーンやクーポン適用も取り消されます。
|
1750
|
+
|
1751
|
+
チャージ取引のキャンセル時に返金すべき残高が足りないときは `account_balance_not_enough (422)` エラーが返ります。
|
1752
|
+
取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
|
1753
|
+
|
1754
|
+
```RUBY
|
1755
|
+
response = $client.send(Pokepay::Request::RefundTransaction.new(
|
1756
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # transaction_id: 取引ID
|
1757
|
+
description: "返品対応のため", # 取引履歴に表示する返金事由
|
1758
|
+
returning_point_expires_at: "2021-07-22T02:45:40.000000Z" # 返却ポイントの有効期限
|
1759
|
+
))
|
1760
|
+
```
|
1761
|
+
|
1762
|
+
|
1763
|
+
|
1764
|
+
### Parameters
|
1765
|
+
**`transaction_id`**
|
1766
|
+
|
1767
|
+
|
1768
|
+
|
1769
|
+
```json
|
1770
|
+
{
|
1771
|
+
"type": "string",
|
1772
|
+
"format": "uuid"
|
1773
|
+
}
|
1774
|
+
```
|
1775
|
+
|
1776
|
+
**`description`**
|
1777
|
+
|
1778
|
+
|
1779
|
+
|
1780
|
+
```json
|
1781
|
+
{
|
1782
|
+
"type": "string",
|
1783
|
+
"maxLength": 200
|
1784
|
+
}
|
1785
|
+
```
|
1786
|
+
|
1787
|
+
**`returning_point_expires_at`**
|
1788
|
+
|
1789
|
+
|
1790
|
+
ポイント支払いを含む支払い取引をキャンセルする際にユーザへ返却されるポイントの有効期限です。デフォルトでは未指定です。
|
1791
|
+
|
1792
|
+
```json
|
1793
|
+
{
|
1794
|
+
"type": "string",
|
1795
|
+
"format": "date-time"
|
1796
|
+
}
|
1797
|
+
```
|
1798
|
+
|
1799
|
+
|
1800
|
+
|
1801
|
+
成功したときは
|
1802
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1803
|
+
を返します
|
1804
|
+
|
1805
|
+
|
1806
|
+
|
1807
|
+
---
|
1808
|
+
|
1809
|
+
|
1810
|
+
<a name="get-transaction-by-request-id"></a>
|
1811
|
+
## GetTransactionByRequestId: リクエストIDから取引情報を取得する
|
1812
|
+
取引を取得します。
|
1813
|
+
|
1814
|
+
```RUBY
|
1815
|
+
response = $client.send(Pokepay::Request::GetTransactionByRequestId.new(
|
1816
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # request_id: リクエストID
|
1817
|
+
))
|
1818
|
+
```
|
1819
|
+
|
1820
|
+
|
1821
|
+
|
1822
|
+
### Parameters
|
1823
|
+
**`request_id`**
|
1824
|
+
|
1825
|
+
|
1826
|
+
取引作成時にクライアントが生成し指定するリクエストIDです。
|
1827
|
+
|
1828
|
+
リクエストIDに対応する取引が存在すればその取引を返し、無ければNotFound(404)を返します。
|
1829
|
+
|
1830
|
+
```json
|
1831
|
+
{
|
1832
|
+
"type": "string",
|
1833
|
+
"format": "uuid"
|
1834
|
+
}
|
1835
|
+
```
|
1836
|
+
|
1837
|
+
|
1838
|
+
|
1839
|
+
成功したときは
|
1840
|
+
[TransactionDetail](./responses.md#transaction-detail)
|
1841
|
+
を返します
|
1842
|
+
|
1843
|
+
|
1844
|
+
|
1845
|
+
---
|
1846
|
+
|
1847
|
+
|
1848
|
+
<a name="get-bulk-transaction"></a>
|
1849
|
+
## GetBulkTransaction: バルク取引ジョブの実行状況を取得する
|
1850
|
+
|
1851
|
+
```RUBY
|
1852
|
+
response = $client.send(Pokepay::Request::GetBulkTransaction.new(
|
1853
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # bulk_transaction_id: バルク取引ジョブID
|
1854
|
+
))
|
1855
|
+
```
|
1856
|
+
|
1857
|
+
|
1858
|
+
|
1859
|
+
### Parameters
|
1860
|
+
**`bulk_transaction_id`**
|
1861
|
+
|
1862
|
+
|
1863
|
+
バルク取引ジョブIDです。
|
1864
|
+
バルク取引ジョブ登録時にレスポンスに含まれます。
|
1865
|
+
|
1866
|
+
```json
|
1867
|
+
{
|
1868
|
+
"type": "string",
|
1869
|
+
"format": "uuid"
|
1870
|
+
}
|
1871
|
+
```
|
1872
|
+
|
1873
|
+
|
1874
|
+
|
1875
|
+
成功したときは
|
1876
|
+
[BulkTransaction](./responses.md#bulk-transaction)
|
1877
|
+
を返します
|
1878
|
+
|
1879
|
+
|
1880
|
+
|
1881
|
+
---
|
1882
|
+
|
1883
|
+
|
1884
|
+
<a name="list-bulk-transaction-jobs"></a>
|
1885
|
+
## ListBulkTransactionJobs: バルク取引ジョブの詳細情報一覧を取得する
|
1886
|
+
|
1887
|
+
```RUBY
|
1888
|
+
response = $client.send(Pokepay::Request::ListBulkTransactionJobs.new(
|
1889
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bulk_transaction_id: バルク取引ジョブID
|
1890
|
+
page: 1, # ページ番号
|
1891
|
+
per_page: 50 # 1ページ分の取得数
|
1892
|
+
))
|
1893
|
+
```
|
1894
|
+
|
1895
|
+
|
1896
|
+
|
1897
|
+
### Parameters
|
1898
|
+
**`bulk_transaction_id`**
|
1899
|
+
|
1900
|
+
|
1901
|
+
バルク取引ジョブIDです。
|
1902
|
+
バルク取引ジョブ登録時にレスポンスに含まれます。
|
1903
|
+
|
1904
|
+
```json
|
1905
|
+
{
|
1906
|
+
"type": "string",
|
1907
|
+
"format": "uuid"
|
1908
|
+
}
|
1909
|
+
```
|
1910
|
+
|
1911
|
+
**`page`**
|
1912
|
+
|
1913
|
+
|
1914
|
+
取得したいページ番号です。
|
1915
|
+
|
1916
|
+
```json
|
1917
|
+
{
|
1918
|
+
"type": "integer",
|
1919
|
+
"minimum": 1
|
1920
|
+
}
|
1921
|
+
```
|
1922
|
+
|
1923
|
+
**`per_page`**
|
1924
|
+
|
1925
|
+
|
1926
|
+
1ページ分の取得数です。デフォルトでは 50 になっています。
|
1927
|
+
|
1928
|
+
```json
|
1929
|
+
{
|
1930
|
+
"type": "integer",
|
1931
|
+
"minimum": 1
|
1932
|
+
}
|
1933
|
+
```
|
1934
|
+
|
1935
|
+
|
1936
|
+
|
1937
|
+
成功したときは
|
1938
|
+
[PaginatedBulkTransactionJob](./responses.md#paginated-bulk-transaction-job)
|
1939
|
+
を返します
|
1940
|
+
|
1941
|
+
|
1942
|
+
|
1943
|
+
---
|
1944
|
+
|
1945
|
+
|
1946
|
+
<a name="request-user-stats"></a>
|
1947
|
+
## RequestUserStats: 指定期間内の顧客が行った取引の統計情報をCSVでダウンロードする
|
1948
|
+
期間を指定して、期間内に発行マネーの全顧客が行った取引の総額・回数などをCSVでダウンロードする機能です。
|
1949
|
+
CSVの作成は非同期で行われるため完了まで少しの間待つ必要がありますが、完了時にダウンロードできるURLをレスポンスとして返します。
|
1950
|
+
このURLの有効期限はリクエスト日時から7日間です。
|
1951
|
+
|
1952
|
+
ダウンロードできるCSVのデータは以下のものです。
|
1953
|
+
|
1954
|
+
* organization_code: 取引を行った組織コード
|
1955
|
+
* private_money_id: 取引されたマネーのID
|
1956
|
+
* private_money_name: 取引されたマネーの名前
|
1957
|
+
* user_id: 決済したユーザーID
|
1958
|
+
* user_external_id: 決済したユーザーの外部ID
|
1959
|
+
* payment_money_amount: 指定期間内に決済に使ったマネーの総額
|
1960
|
+
* payment_point_amount: 指定期間内に決済に使ったポイントの総額
|
1961
|
+
* payment_transaction_count: 指定期間内に決済した回数。キャンセルされた取引は含まない
|
1962
|
+
|
1963
|
+
また、指定期間より前の決済を時間をおいてキャンセルした場合などには payment_money_amount, payment_point_amount, payment_transaction_count が負の値になることもあることに留意してください。
|
1964
|
+
|
1965
|
+
```RUBY
|
1966
|
+
response = $client.send(Pokepay::Request::RequestUserStats.new(
|
1967
|
+
"2022-05-20T17:56:49.000000+09:00", # from: 集計期間の開始時刻
|
1968
|
+
"2023-12-10T01:16:11.000000+09:00" # to: 集計期間の終了時刻
|
1969
|
+
))
|
1970
|
+
```
|
1971
|
+
|
1972
|
+
|
1973
|
+
|
1974
|
+
### Parameters
|
1975
|
+
**`from`**
|
1976
|
+
|
1977
|
+
|
1978
|
+
集計する期間の開始時刻をISO8601形式で指定します。
|
1979
|
+
時刻は現在時刻、及び `to` で指定する時刻以前である必要があります。
|
1980
|
+
|
1981
|
+
```json
|
1982
|
+
{
|
1983
|
+
"type": "string",
|
1984
|
+
"format": "date-time"
|
1985
|
+
}
|
1986
|
+
```
|
1987
|
+
|
1988
|
+
**`to`**
|
1989
|
+
|
1990
|
+
|
1991
|
+
集計する期間の終了時刻をISO8601形式で指定します。
|
1992
|
+
時刻は現在時刻、及び `from` で指定する時刻の間である必要があります。
|
1993
|
+
|
1994
|
+
```json
|
1995
|
+
{
|
1996
|
+
"type": "string",
|
1997
|
+
"format": "date-time"
|
1998
|
+
}
|
1999
|
+
```
|
2000
|
+
|
2001
|
+
|
2002
|
+
|
2003
|
+
成功したときは
|
2004
|
+
[UserStatsOperation](./responses.md#user-stats-operation)
|
2005
|
+
を返します
|
2006
|
+
|
2007
|
+
### Error Responses
|
2008
|
+
|status|type|ja|en|
|
2009
|
+
|---|---|---|---|
|
2010
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
2011
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
2012
|
+
|422|invalid_promotional_operation_user|ユーザーの指定に不正な値が含まれています|Invalid user data is specified|
|
2013
|
+
|422|invalid_promotional_operation_status|不正な処理ステータスです|Invalid operation status is specified|
|
2014
|
+
|503|user_stats_operation_service_unavailable|一時的にユーザー統計サービスが利用不能です|User stats service is temporarily unavailable|
|
2015
|
+
|
2016
|
+
|
2017
|
+
|
2018
|
+
---
|
2019
|
+
|
2020
|
+
|
2021
|
+
|