获取merchant_access_token
CUSTOMERS_WRITE
CUSTOMERS_READ
ITEMS_WRITE
ITEMS_READ
MERCHANT_PROFILE_WRITE
MERCHANT_PROFILE_READ
ORDERS_WRITE+ORDERS_READ
PAYMENTS_WRITE
PAYMENTS_READ
PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS来自https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees
当我运行命令时,我得到了Insufficient permissions to set app_fee_money
我从应用程序和邮递员那里试过这个
我做错了什么?
curl --location --request POST 'https://connect.squareupsandbox.com/v2/payments' \
--header 'Square-Version: 2021-01-21' \
--header 'Authorization: Bearer merchant_access_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"source_id": "ccof:customer-card-id-ok",
"idempotency_key": "6726cbd2-7893-4cc3-908e-c54731e9f1fe77979",
"amount_money": {
"amount": 5000,
"currency": "USD"
},
"app_fee_money": {
"amount": 1220,
"currency": "USD"
},
"customer_id": "676YFJE8CCRPZ2K7F9C155JYP8",
"location_id": "LG5CC4T0JXCX9", //Merchant location id
"order_id": "M4C0LcxaW6DNpbyxE7sLypvbFA8zb4F",
"reference_id": "M4C0LcxaW6DNpbyxE7sLypvbFA8zb4F",
"statement_description_identifier": "Organization name",
"note": "Fee note"
}'发布于 2021-02-19 15:22:01
PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS在代码中,但是旧版本的作用域没有运行,所以修复了它。谢谢@sjosey
https://stackoverflow.com/questions/66234978
复制相似问题