Skip to content

Commit

Permalink
add error response
Browse files Browse the repository at this point in the history
  • Loading branch information
otothea committed Mar 4, 2022
1 parent a9f0fb9 commit 74f7983
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions docs/loyalty/documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Get the information about the team

Request

=========== ======== ======================================================
=========== ======== ==========================================
Field Type Description
=========== ======== ======================================================
=========== ======== ==========================================
\- \- \-
=========== ======== ======================================================
=========== ======== ==========================================

Response

Expand Down Expand Up @@ -108,12 +108,12 @@ Log In

Request

=========== ======== ======================================================
=========== ======== ==========================================
Field Type Description
=========== ======== ======================================================
=========== ======== ==========================================
email string
password string
=========== ======== ======================================================
=========== ======== ==========================================

Response

Expand Down Expand Up @@ -158,12 +158,21 @@ If the new tier is a paid subscription, then it will return information about th

Request

=========== ======== ======================================================
=========== ======== =====================================================
Field Type Description
=========== ======== ======================================================
=========== ======== =====================================================
interval string The billing interval. Should be ``month`` or ``year``
tier number Tier ID
=========== ======== ======================================================
=========== ======== =====================================================

Response

=========== ======== =============================================================================================================================================================
Field Type Description
=========== ======== =============================================================================================================================================================
amountDue [number] The amount due in cents to process the upgrade. If included, the user should be prompted to confirm the amount and then use the ``/billing/confirm`` endpoint
href [string] If included, you should immediately redirect to this href
=========== ======== =============================================================================================================================================================

Confirm Upgrade Tier
--------------------
Expand All @@ -174,12 +183,12 @@ This endpoint should ONLY be used after first using the ``/billing/upgrade`` end

Request

=========== ======== ======================================================
=========== ======== =====================================================
Field Type Description
=========== ======== ======================================================
=========== ======== =====================================================
interval string The billing interval. Should be ``month`` or ``year``
tier number Tier ID
=========== ======== ======================================================
=========== ======== =====================================================

Manage Billing
--------------
Expand All @@ -190,8 +199,29 @@ Use this endpoint to request a URL for a billing management portal session

Request

=========== ======== ======================================================
=========== ======== ==========================================
Field Type Description
=========== ======== ======================================================
=========== ======== ==========================================
\- \- \-
=========== ======== ======================================================
=========== ======== ==========================================

Response

=========== ======== ==========================================
Field Type Description
=========== ======== ==========================================
href string The href to the billing management session
=========== ======== ==========================================

Errors
------

Any errors will be returned with a non-2XX status code.

Response

=========== ======== ==========================================
Field Type Description
=========== ======== ==========================================
message string The message describing the error
=========== ======== ==========================================

0 comments on commit 74f7983

Please sign in to comment.