post
https://api.momence.com/api/v2/host/checkout
Perform payment for specified items in the checkout cart on behalf of the specified member. The endpoint will return list of purchased items. The checkout endpoint will reject any request that doesn't contain correct prices even when you're using memberships to pay.
NOTE: Currently the endpoint only supports buying sessions with membership payment method.
NOTE: You should call /prices endpoint to fetch correct prices for every item in the cart before calling this endpoint
NOTE: You should call /compatible-memberships endpoint to fetch list of bought memberships that are potentially compatible with the cart before calling this endpoint
| Error | Description |
|---|---|
| err-no-payment-methods | request doesn't contain any payment methods |
| err-no-items | request doesn't contain any items |
| err-too-many-items | request contain more than 1 items |
| err-combined-payment-methods | request contains multiple payment method types in single request |
| err-cannot-pay-for-membership-with-membership | request is attempting to buy membership with membership |
| err-multiple-membership-types | request is combining different membership types in payment methods |
| err-multiple-subscriptions | request contains more than 1 subscription payment methods |
| err-saved-card-not-found | request contains invalid saved card payment method |
| err-cart-validation-failed | general error when validating cart |
| err-payment-failed | error occurred during payment processing |
| err-duplicate-membership-payment-methods | request contains single bought membership multiple times |
| err-invalid-membership-payment-method | request contains invalid membership payment method |
| err-incompatible-membership | request contains membership that's incompatible with the checkout cart |
| err-unsupported-payment-methods | request contains invalid payment methods |
| err-session-has-invalid-state | request contains session with status that prevent sale |
| err-session-has-passed | request contains session that has already passed |
| err-session-sales-ended | request contains session that has ended sales |
| err-session-dropins-not-allowed | request contains session that does not allow dropins |
| err-session-is-full | request contains session that's full |
| err-session-purchase-limit-reached | request contains session that member has already booked and host doesn't allow that |
| err-session-access-restricted | request contains session that requires specific tag to book |
| err-duplicate-item-ids | request contains single item id multiple times |
| err-duplicate-payment-method-ids | request contains single payment method id multiple times |
| err-unsupported-item-type | request contains unsupported item type |
| err-missing-customer-date-of-birth | customer has no birthday information, but it's required |
| err-customer-age-prevents-from-action | customer is not eligible for the action due to age restriction |
| err-invalid-custom-payment-method | request contains invalid custom payment method id |