diff --git a/openapi/components/requestBodies/Webhooks/SubscriptionWebhook.yaml b/openapi/components/requestBodies/Webhooks/SubscriptionWebhook.yaml index 522e7ad0df..1ae9b2176f 100644 --- a/openapi/components/requestBodies/Webhooks/SubscriptionWebhook.yaml +++ b/openapi/components/requestBodies/Webhooks/SubscriptionWebhook.yaml @@ -25,6 +25,7 @@ content: - subscription-trial-end-reminder - subscription-trial-ended - subscription-upgraded + - order-delinquency-reached _embedded: type: object description: Embedded objects. diff --git a/openapi/components/schemas/EventType.yaml b/openapi/components/schemas/EventType.yaml index 47d88e7773..acd79c62e1 100644 --- a/openapi/components/schemas/EventType.yaml +++ b/openapi/components/schemas/EventType.yaml @@ -83,3 +83,4 @@ enum: - transaction-discrepancy-found - transaction-process-requested - transaction-processed + - order-delinquency-reached diff --git a/openapi/components/schemas/GlobalEventType.yaml b/openapi/components/schemas/GlobalEventType.yaml index 2d58f03e20..4ae3e76053 100644 --- a/openapi/components/schemas/GlobalEventType.yaml +++ b/openapi/components/schemas/GlobalEventType.yaml @@ -100,3 +100,4 @@ enum: - transaction-reconciled - transaction-timeout-resolved - waiting-gateway-transaction-completed + - order-delinquency-reached diff --git a/openapi/components/schemas/Subscription.yaml b/openapi/components/schemas/Subscription.yaml index e663878155..2302524a5e 100644 --- a/openapi/components/schemas/Subscription.yaml +++ b/openapi/components/schemas/Subscription.yaml @@ -333,6 +333,16 @@ properties: If this value is not passed during order creation, a [pending order TTL](https://all-rebilly.redoc.ly/tag/Organizations/operation/PatchOrganization/#!path=settings/billing/pendingOrderTtl&t=request) setting is used to calculate the value. format: date-time + delinquencyPeriod: + type: + - 'string' + - 'null' + description: |- + Length of time, in ISO-8601 durations format, + before which an order with an invoice in past the due state is automatically canceled. + If the provided value is `null`, the order does not change state. + example: P7D + default: null couponIds: type: - 'array' diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 92ad11c28f..b7be7e8a19 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1564,3 +1564,6 @@ webhooks: data-export-completed: post: $ref: ./webhooks/data-export-completed.yaml + order-delinquency-reached: + post: + $ref: ./webhooks/order-delinquency-reached.yaml diff --git a/openapi/webhooks/order-delinquency-reached.yaml b/openapi/webhooks/order-delinquency-reached.yaml new file mode 100644 index 0000000000..37bc23a79d --- /dev/null +++ b/openapi/webhooks/order-delinquency-reached.yaml @@ -0,0 +1,11 @@ +summary: Order delinquency time reached +operationId: order-delinquency-reached +x-products: + - Core +tags: + - Orders +requestBody: + $ref: ../components/requestBodies/Webhooks/SubscriptionWebhook.yaml +responses: + '2xx': + description: Returns any 2xx status to indicate that data is received.