Payments & Deposits
The payments side of Hostme: deposits and prepayments for reservations, fees and payment statuses.
This section covers the payments side of Hostme: deposits and prepayments for reservations (payment intents, secrets, payment statuses, refunds), plus service endpoints for the restaurant’s own payment cards, pricing plans and subscription.
All endpoints require a Bearer token (see Authentication) and live under
the base path /api/core/payment. Payment operations on reservations are directly tied to
BookingContract fields: depositToken, depositStatus, paymentType, intentClientSecret,
paymentLinkUrl, details.paymentLinkUrl — see Reservations.
| Method | Path | Purpose |
|---|---|---|
POST | /restaurants/{restaurantId}/intents | Create a payment intent (get a secret) |
POST | /restaurants/{restaurantId}/reservations/{reservationId}/refund | Refund a reservation deposit |
GET | /restaurants/{restaurantId}/cards | List payment cards |
POST | /restaurants/{restaurantId}/cards | Attach a card |
PUT | /restaurants/{restaurantId}/cards/{cardId} | Make a card the default |
DELETE | /restaurants/{restaurantId}/cards/{cardId} | Remove a card |
GET | /restaurants/{restaurantId}/charges | Charge history |
GET | /restaurants/{restaurantId}/plans | List pricing plans |
GET | /restaurants/{restaurantId}/subscriptions | Restaurant subscriptions |
Deposits and prepayments for reservations
If the restaurant has prepayments or deposits configured, the reservation (BookingContract)
gains payment fields. They are populated when the reservation is created/processed and updated
as the payment progresses:
| Reservation field | Type | Purpose |
|---|---|---|
paymentType | string | Payment type for the reservation |
depositToken | string | Deposit token (passed when creating a reservation with prepayment) |
depositStatus | string | Deposit payment status |
isDeposit | boolean | Whether the payment is a deposit |
amount | number | Amount due |
receiptAmount | number | Actual receipt amount |
currency | string | Currency |
cardAttached | boolean | Whether the guest’s card is attached |
paymentCustomerId | string | Payer identifier in the payment system |
intentClientSecret | string | Client secret of the payment intent (for confirming the payment on the guest’s side) |
paymentLinkUrl | string | Payment link |
redirectLinkUrl | string | Redirect URL after payment |
details.paymentLinkUrl | string | Payment link inside the details block |
details.paymentError | string | Payment error text, if any |
The
depositTokenfield is passed when creating a reservation and ties the prepayment to the booking. Track the subsequent status indepositStatusanddetails.paymentError.
Create a payment intent
POST /restaurants/{restaurantId}/intents
Creates a payment intent and returns the secret the guest uses to confirm the payment on their side (in the payment widget). Used when taking a deposit/prepayment.
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
Response — IntentSecretContract
| Field | Type | Description |
|---|---|---|
secret | string | Client secret for confirming the payment |
paymentMethod | object GuestPaymentMethod | Payment method (enum: 0, 1) |
curl -X POST https://api.hostmeapp.com/api/core/payment/restaurants/123/intents \ -H "Authorization: Bearer $TOKEN"The returned
secretmatches theintentClientSecretfield inBookingContractand is used by the guest-facing frontend to complete the payment.
Refund a deposit
POST /restaurants/{restaurantId}/reservations/{reservationId}/refund
Refunds the deposit (in full or in part) for a specific reservation. The refund amount is set in the request body; the response is the updated reservation.
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | string | Restaurant identifier |
reservationId * | path | string | Reservation identifier |
Body — PaymentRefundContract
| Field | Type | Description |
|---|---|---|
amount | number | Refund amount |
curl -X POST https://api.hostmeapp.com/api/core/payment/restaurants/123/reservations/RID/refund \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00 }'Response. The updated reservation (
BookingContract) is returned — check thedepositStatus,receiptAmountanddetails.paymentErrorfields to confirm the refund succeeded. For the fullBookingContractstructure, see Reservations.
Restaurant payment cards
Cards are used to pay for the restaurant’s own subscription and service charges.
List cards
GET /restaurants/{restaurantId}/cards
Returns an array of PaymentCard cards.
| Field | Type | Description |
|---|---|---|
id | string | Card identifier |
name | string | Name/holder |
brand | string | Card network (Visa, Mastercard, …) |
last4 | string | Last 4 digits |
expirationMonth | integer | Expiration month |
expirationYear | integer | Expiration year |
isDefault | boolean | Default card |
curl https://api.hostmeapp.com/api/core/payment/restaurants/123/cards \ -H "Authorization: Bearer $TOKEN"Attach a card
POST /restaurants/{restaurantId}/cards
Body — TokenContract: tokenized card data.
| Field | Type | Description |
|---|---|---|
value | string | Card payment token |
email | string | Payer’s email |
fullName | string | Cardholder name |
curl -X POST https://api.hostmeapp.com/api/core/payment/restaurants/123/cards \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": "tok_ABC_ID", "email": "owner@example.com", "fullName": "John Parker" }'Default card
PUT /restaurants/{restaurantId}/cards/{cardId}
Makes the specified card the default.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
cardId * | path | string |
Remove a card
DELETE /restaurants/{restaurantId}/cards/{cardId}
Detaches the card from the restaurant.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
cardId * | path | string |
Charge history
GET /restaurants/{restaurantId}/charges
Returns a paginated list of charges.
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
skip | query | integer | Number of records to skip |
take | query | integer | Number of records to return |
curl -G https://api.hostmeapp.com/api/core/payment/restaurants/123/charges \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode "skip=0" \ --data-urlencode "take=20"The exact schema of the successful response (200) is not fixed in the specification — the charge structure is returned by the payment system.
Pricing plans and restaurant subscription
This group of endpoints manages the restaurant’s own Hostme subscription (plans, sign-up, cancellation). Most partner integrations do not need it.
List plans
GET /restaurants/{restaurantId}/plans
Returns an array of PaymentPlanContract.
| Field | Type | Description |
|---|---|---|
id | string | Plan identifier |
name | string | Name |
currency | string | Currency |
amount | integer | Price |
interval | string | Billing interval |
intervalCount | integer | Number of intervals |
status | string | Plan status |
liveMode | boolean | Live mode (not test) |
trialPeriodDays | integer | Trial period, days |
created | date-time | Creation date |
metadata | object ExtraPlanData | Extra plan data: appId, features, price, discount, pos, mailing, etc. |
curl https://api.hostmeapp.com/api/core/payment/restaurants/123/plans \ -H "Authorization: Bearer $TOKEN"Plan by ID
GET /restaurants/{restaurantId}/plans/{planId}
Returns a single plan by identifier (planId — path).
Email a plan
POST /restaurants/{restaurantId}/plans/{planId}/email
Body — PaymentPlanMailContract: { "email": "..." }. Sends the plan description to the given address.
Subscribe
POST /restaurants/{restaurantId}/subscriptions
Body — PaymentCreateSubscriptionContract.
| Field | Type | Description |
|---|---|---|
planId | string | Pricing plan identifier |
couponId | string | Coupon/discount |
fullName | string | Payer’s name |
email | string | |
intentId | string | Payment intent identifier |
paymentCustomerId | string | Payer identifier |
curl -X POST https://api.hostmeapp.com/api/core/payment/restaurants/123/subscriptions \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "planId": "plan_ABC_ID", "fullName": "John Parker", "email": "owner@example.com" }'Current subscriptions
GET /restaurants/{restaurantId}/subscriptions
Returns the restaurant’s subscriptions.
Subscription usage
GET /restaurants/{restaurantId}/subscription/usage
Returns usage data within the subscription (quotas, consumption).
Cancel a subscription
DELETE /restaurants/{restaurantId}/subscriptions/{subscriptionId}
Body — CancelationReasonContract.
| Field | Type | Description |
|---|---|---|
reason | string | Cancellation reason |
newVendorName | string | Name of the new vendor (if switching) |
customReasonMessage | string | Free-form comment |
Cancellation feedback
POST /restaurants/{restaurantId}/subscriptions/{subscriptionId}/feedback
Body — CancelationFeedbackContract: experience, customExperienceMessage. Collects feedback
after a subscription is cancelled.
Payment reminder
POST /restaurants/{restaurantId}/remind
Sends a reminder that the subscription payment is due.
Miscellaneous
POST /restaurants/{restaurantId}/accounts— create a payment account (body —TokenContract:value,email,fullName).GET /restaurants/{restaurantId}/customer— the restaurant’s payer details.DELETE /restaurants/{restaurantId}/customer— delete the payer.
The
POST /payment/eventsandPOST /payment/events/{appId}endpoints are service webhooks of the payment system; partner integrations do not call them directly.
General request rules and error codes are in Conventions and Errors. Payment fields within a reservation are described in Reservations.