RentalTideRentalTideDocs
Dashboard

Payments API

Manage promo codes, gift cards, and protection plans

Endpoints for promotional codes, gift card management, and protection plan configuration.

Promo & Gift Cards

Get promo/gift cards for a customer

GET /promoGiftCards

Returns all promo codes and gift cards for a customer, or a specific one if promoCode is provided

Parameters

NameInTypeRequiredDescription
customerIdquerystringYesThe customer ID to retrieve promo/gift cards for
promoCodequerystringNoOptional specific promo code to retrieve

Responses

CodeDescription
200Promo/gift cards retrieved successfully
400customerId is required
500Internal server error

Create a new promo/gift card

POST /promoGiftCards

Creates a new promo code or gift card. Requires either $Discount or %Discount in Details.

Request body

FieldTypeRequiredDescription
promoCodestringYes
customerIdstringYes
ExpiryDatestringYes
DetailsobjectYes
inventoryIdsarrayNo
locationIdstringNo
affiliateIdstringNoOptional affiliate association

Responses

CodeDescription
201Promo/gift card created successfully
400Missing required fields or invalid discount
409Promo code already exists for this customer
500Internal server error

Update a promo/gift card

PATCH /promoGiftCards

Updates an existing promo/gift card. Supports updating affiliateId and discount fields.

Request body

FieldTypeRequiredDescription
promoCodestringYes
customerIdstringYes
UpdatesobjectYesFields to update

Responses

CodeDescription
200Promo/gift card updated successfully
400Missing required fields or invalid affiliate
404Promo code not found for this customer
500Internal server error

Delete a promo/gift card

DELETE /promoGiftCards

Deletes a promo/gift card by promo code and customer ID

Parameters

NameInTypeRequiredDescription
promoCodequerystringYesThe promo code to delete
customerIdquerystringYesThe customer ID

Responses

CodeDescription
200Promo/gift card deleted successfully
400promoCode and customerId are required
404Promo code not found for this customer
500Internal server error

Search promo codes across all customers

GET /promoGiftCards/search

Uses GSI to find all instances of a promo code across customers (for admin purposes)

Parameters

NameInTypeRequiredDescription
promoCodequerystringYesThe promo code to search for

Responses

CodeDescription
200Search results
400promoCode is required
500Internal server error

Check gift card balance

GET /promoGiftCards/balance

Check the remaining balance of a gift card or usage info for a promo code

Parameters

NameInTypeRequiredDescription
promoCodequerystringYesThe promo/gift card code to check
customerIdquerystringNoOptional customer ID for faster lookup

Responses

CodeDescription
200Balance information retrieved successfully
400promoCode is required
404Gift card or promo code not found
500Internal server error

Apply a promo code

POST /promoGiftCards/use

Tracks promo code usage and affiliate commissions when a promo code is applied

Request body

FieldTypeRequiredDescription
promoCodestringYes
customerIdstringYesThe customer who owns the promo code
orderAmountnumberYesThe order amount to apply the discount to
userIdstringNoOptional - the user applying the promo code

Responses

CodeDescription
200Promo code applied successfully
400Missing required fields, expired promo code, or usage limit reached
404Promo code not found for this customer
500Internal server error

Get promo codes for an affiliate

GET /promoGiftCards/affiliate/{affiliateId}

Retrieves all promo codes associated with a specific affiliate and analytics

Parameters

NameInTypeRequiredDescription
affiliateIdpathstringYesThe affiliate ID
customerIdquerystringYesThe customer ID

Responses

CodeDescription
200Affiliate promo codes retrieved successfully
400customerId is required or invalid affiliate
500Internal server error

Public Gift Cards

Create payment intent for gift card

POST /public/gift-card/create-payment-intent

Creates a Stripe payment intent for purchasing a gift card

Request body

FieldTypeRequiredDescription
amountnumberYesTotal amount including fees
giftCardAmountnumberNoGift card value amount
customerIdstringYes
giftCardCodestringYes
recipientNamestringNo
recipientEmailstringNo
messagestringNo
expiryDatestringNo
currencystringNo
connectAccountIdstringNoStripe Connect account ID for transfer
applicationFeeAmountnumberNoPlatform fee amount

Responses

CodeDescription
200Payment intent created successfully
400Missing required fields or invalid amount
500Internal server error

Confirm gift card payment

POST /public/gift-card/confirm-payment

Confirms payment and creates the gift card after successful Stripe payment

Request body

FieldTypeRequiredDescription
paymentIntentIdstringYesThe Stripe payment intent ID to confirm

Responses

CodeDescription
201Gift card created successfully
400Payment intent ID required or payment not successful
409Gift card code already exists
500Internal server error

Stripe webhook handler

POST /public/gift-card/webhook

Stripe webhook endpoint to handle payment events for gift cards (backup verification)

Responses

CodeDescription
200Webhook received and processed
400Webhook not configured or invalid signature

Send gift card email

POST /public/gift-card/send-email

Sends a gift card via email to the recipient with redemption instructions

Request body

FieldTypeRequiredDescription
giftCardCodestringYes
giftCardAmountnumberYes
recipientEmailstringYes
recipientNamestringNo
messagestringNo
expiryDatestringNo
customerIdstringYes

Responses

CodeDescription
200Email sent successfully
400Missing required fields or invalid email format
500Email service error or failed to send

Charge saved card for gift card

POST /public/gift-card/charge-saved-card

Charges a saved payment method for gift card purchase

Request body

FieldTypeRequiredDescription
paymentMethodIdstringYesStripe payment method ID
amountnumberYes
currencystringNo
customerIdstringYes
stripeCustomerIdstringNo
descriptionstringNo
metadataobjectNo
connectAccountIdstringNoStripe Connect account ID for transfer
applicationFeeAmountnumberNoPlatform fee amount

Responses

CodeDescription
200Payment processed successfully
400Missing required fields or invalid amount
500Internal server error

Protection Plans

Get available protection plans

GET /api/v2/protection-plans

Returns protection plans for a specific industry

Parameters

NameInTypeRequiredDescription
industryquerystringNoIndustry type (defaults to marine)
locationIdquerystringNoLocation ID to filter by enabled plans
includeInactivequerybooleanNoInclude inactive plans (admin only)

Responses

CodeDescription
200List of protection plans
500Server error

Get available protection bundles

GET /api/v2/protection-bundles

Returns protection bundles for a specific industry

Parameters

NameInTypeRequiredDescription
industryquerystringNoIndustry type (defaults to marine)
locationIdquerystringNoLocation ID to filter by enabled bundles

Responses

CodeDescription
200List of protection bundles
500Server error

Get a specific protection plan by code

GET /api/v2/protection-plans/{planCode}

Parameters

NameInTypeRequiredDescription
planCodepathstringYes

Responses

CodeDescription
200Protection plan details
404Plan not found
500Server error

Get a specific protection bundle by code with included plans

GET /api/v2/protection-bundles/{bundleCode}

Parameters

NameInTypeRequiredDescription
bundleCodepathstringYes

Responses

CodeDescription
200Protection bundle details with included plans
404Bundle not found
500Server error

Get protection settings for a location

GET /api/v2/locations/{locationId}/protection-settings

Parameters

NameInTypeRequiredDescription
locationIdpathstringYes

Responses

CodeDescription
200Location protection settings
404Settings not found (returns defaults)
500Server error

Update protection settings for a location

PUT /api/v2/locations/{locationId}/protection-settings

Parameters

NameInTypeRequiredDescription
locationIdpathstringYes

Request body

FieldTypeRequiredDescription
industrystringNo
enabledPlanCodesarrayNo
enabledBundleCodesarrayNo
planOverridesobjectNo

Responses

CodeDescription
200Settings updated successfully
400Invalid request
500Server error

Enable a plan for a location

POST /api/v2/locations/{locationId}/protection-settings/plan/{planCode}

Responses

CodeDescription
200Plan enabled

Disable a plan for a location

DELETE /api/v2/locations/{locationId}/protection-settings/plan/{planCode}

Responses

CodeDescription
200Plan disabled

Enable a bundle for a location

POST /api/v2/locations/{locationId}/protection-settings/bundle/{bundleCode}


Disable a bundle for a location

DELETE /api/v2/locations/{locationId}/protection-settings/bundle/{bundleCode}


Set pricing override for a plan at a location

PUT /api/v2/locations/{locationId}/protection-settings/override/{planCode}

Request body

FieldTypeRequiredDescription
percentagenumberNo
maxCapnumberNo

Remove pricing override for a plan at a location

DELETE /api/v2/locations/{locationId}/protection-settings/override/{planCode}


Was this page helpful?
Need help? Contact Support.See what’s new. Check out changelog.Questions? Book a video chat.
Ask AI
Responses are generated using AI and may contain mistakes.
Ask questions about RentalTide and get help with your integration.