Saltar para o conteúdo

Visão geral

  • Versão: 2.0
  • Servidores: https://api.xsolla.com/merchant/v2/

Essa referência API descreve os pontos de extremidade na gerência de assinaturas, cupons e promoções. Para obter mais informações sobre as Assinaturas, veja o guia do produto e o glossário.

Transferir a descrição da OpenAPI
Idiomas
Servidores
Mock server
https://xsolla.redocly.app/_mock/pt/api/subscriptions/
Operações
Operações
Operações
Operações
Operações
Operações
Operações
Operações

Pedido

Segurança
subscriptionsManagementJwtAuth
Caminho
subscription_idinteger\d+obrigatório
project_idinteger\d+obrigatório
Consulta
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/pt/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Respostas

List of available plans for change

Corpoapplication/json
has_morebooleanobrigatório
Exemplo: "false"
itemsArray of objects(PlanResponse)
Padrão []
Resposta
application/json
{ "has_more": "false", "items": [] }

Pedido

Segurança
subscriptionsManagementJwtAuth
Caminho
subscription_idinteger\d+obrigatório
plan_idinteger\d+obrigatório
project_idinteger\d+obrigatório
Consulta
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/pt/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change/{plan_id}?locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Respostas

Available plans for change with payment details

Corpoapplication/json
chargeobject(Charge2)obrigatório
charge.​amountnumber(float)obrigatório
Exemplo: "4.99"
charge.​currencystringobrigatório
Exemplo: "USD"
charge.​setup_feenumber or null(float)
Exemplo: "0.99"
payment_detailsobject(PaymentDetails)obrigatório
payment_details.​surcharge(Surcharge (object or null))
Padrão null
(Surcharge (object or null))
Padrão null
payment_details.​unused(Unused (object or null))
Padrão null
(Unused (object or null))
Padrão null
periodobject(Period2)obrigatório
period.​unitstring or null
Padrão null
Exemplo: "month"
period.​valueinteger or null
Padrão null
Exemplo: "1"
plan_descriptionstringobrigatório
Exemplo: "Localized plan description"
plan_end_datestring or null(date-time)
Exemplo: "2031-04-11T13:51:02+03:00"
plan_external_idstringobrigatório
Exemplo: "PlanExternalId"
plan_group_idstring or null
Exemplo: "TestGroupId"
plan_idintegerobrigatório
Exemplo: "54321"
plan_namestringobrigatório
Exemplo: "Localized plan name"
plan_start_datestring or null(date-time)
Exemplo: "2021-04-11T13:51:02+03:00"
plan_typestringobrigatório
Exemplo: "all"
promotionobject(Promotion)obrigatório
promotion.​promotion_charge_amountnumber or null(float)
Padrão null
Exemplo: "3.99"
promotion.​promotion_remaining_chargesinteger or null
Padrão null
Exemplo: "3"
trial_periodinteger or null
Exemplo: "7"
Resposta
application/json
{ "charge": { "amount": "4.99", "currency": "USD", "setup_fee": "0.99" }, "payment_details": { "surcharge": null, "unused": null }, "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_end_date": "2031-04-11T13:51:02+03:00", "plan_external_id": "PlanExternalId", "plan_group_id": "TestGroupId", "plan_id": "54321", "plan_name": "Localized plan name", "plan_start_date": "2021-04-11T13:51:02+03:00", "plan_type": "all", "promotion": { "promotion_charge_amount": "3.99", "promotion_remaining_charges": "3" }, "trial_period": "7" }