Renta Docs

Payments API

Create Stripe payment intents for booking payments via Stripe Connect.

The Payments API creates Stripe PaymentIntents for booking payments. Renta uses Stripe Connect to process payments on behalf of each tenant, with automatic application fee collection based on the tenant's subscription tier.

Monetary values are in cents. An amount of 5500 equals $55.00.

Create Payment Intent

POST /v1/payments/create-intent

Creates a Stripe PaymentIntent for a booking. The intent includes the application fee (Renta's transaction fee) based on the tenant's subscription tier.

Body Parameters:

ParameterTypeRequiredDescription
booking_idstringBooking to create payment for
amountintegerPayment amount in cents
const intent = await renta.payments.createIntent({
  booking_id: 'bk_def456',
  amount: 10800,
});

console.log(`Payment Intent: ${intent.payment_intent_id}`);
console.log(`Client Secret: ${intent.client_secret}`);
console.log(`Amount: $${(intent.amount / 100).toFixed(2)}`);
console.log(`App Fee: $${(intent.application_fee / 100).toFixed(2)}`);
curl -X POST https://api.getrenta.io/v1/payments/create-intent \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "booking_id": "bk_def456",
    "amount": 10800
  }'

Response:

{
  "success": true,
  "payment_intent_id": "pi_stripe_abc123",
  "client_secret": "pi_stripe_abc123_secret_xyz",
  "amount": 10800,
  "application_fee": 270
}

Application Fees

Renta collects a transaction fee based on the tenant's subscription tier:

TierTransaction Fee
Free3% per booking
Launch2.5% per booking
Grow2.5% per booking
Pro0% (no transaction fee)

The application_fee in the response shows the calculated Renta fee.

Using the Client Secret

Pass the client_secret to Stripe.js on the frontend to confirm the payment:

import { loadStripe } from '@stripe/stripe-js';

const stripe = await loadStripe('pk_live_...');

const { error } = await stripe.confirmCardPayment(intent.client_secret, {
  payment_method: {
    card: cardElement,
    billing_details: {
      name: 'John Doe',
    },
  },
});

if (error) {
  console.error(error.message);
} else {
  console.log('Payment successful!');
}

The tenant must have Stripe Connect configured. If Stripe credentials are not set up, the endpoint returns 500 Internal Error.

Error Responses

StatusTypeWhen
402payment_failedStripe rejected the payment
404not_foundBooking not found
500internal_errorStripe not configured or server error