- Authorization
- Orders
- Payments
- Invoices
- Subscriptions
- Catalog Products
- Plans
- Subscriptions
- Payouts
- Webhooks
- Shipment Tracking
- Transaction Search
- Disputes
- List disputes
- Show dispute details
- Accept claim
- Appeal dispute
- Settle dispute
- Update dispute status
- Make offer to resolve dispute
- Provide evidence
- Acknowledge returned item
- Provide supporting information for dispute
- Escalate dispute to claim
- Accept offer to resolve dispute
- Send message about dispute to other party
- Deny offer to resolve dispute
- Partially update dispute
- Onboarding (Limited Release)
Update pricing
POST
/v1/billing/plans/{billing_plan_id}/update-pricing-schemes
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
Path 参数
billing_plan_id
string
必需
示例值:
{{billing_plan_id}}
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
pricing_schemes
array [object {2}]
必需
billing_cycle_sequence
integer
必需
pricing_scheme
object
必需
示例
{
"pricing_schemes": [
{
"billing_cycle_sequence": 1,
"pricing_scheme": {
"fixed_price": {
"value": "10",
"currency_code": "USD"
},
"roll_out_strategy": {
"effective_time": "2022-11-01T00:00:00Z",
"process_change_from": "NEXT_PAYMENT"
}
}
},
{
"billing_cycle_sequence": 2,
"pricing_scheme": {
"fixed_price": {
"value": "50",
"currency_code": "USD"
},
"roll_out_strategy": {
"effective_time": "2022-11-01T00:00:00Z",
"process_change_from": "NEXT_PAYMENT"
}
}
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api-m.sandbox.paypal.com/v1/billing/plans/{{billing_plan_id}}/update-pricing-schemes' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"pricing_schemes": [
{
"billing_cycle_sequence": 1,
"pricing_scheme": {
"fixed_price": {
"value": "10",
"currency_code": "USD"
},
"roll_out_strategy": {
"effective_time": "2022-11-01T00:00:00Z",
"process_change_from": "NEXT_PAYMENT"
}
}
},
{
"billing_cycle_sequence": 2,
"pricing_scheme": {
"fixed_price": {
"value": "50",
"currency_code": "USD"
},
"roll_out_strategy": {
"effective_time": "2022-11-01T00:00:00Z",
"process_change_from": "NEXT_PAYMENT"
}
}
}
]
}'
返回响应
🟢204204 - Update Pricing
application/json
Body
object {0}
示例
{}
🟠401401 Unauthorized - Invalid Token
🟠404404 Not Found - Billing Plan Not Found
🟠422422 Unprocessable Entity - Invalid Pricing Scheme
🟠422422 Unprocessable Entity - Invalid Pricing Scheme Amount
修改于 2023-08-16 07:18:59