Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /chargescurl -X POST https://api.forhopp.com/v1/charges \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve documentation
Retrieves a documentation resource with the specified parameters.
Endpoint
GET /charges/{charge_id}curl -X GET https://api.forhopp.com/v1/charges/{charge_id} \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve documentation
Retrieves a documentation resource with the specified parameters.
Endpoint
GET /charges?limit=10&status=capturedcurl -X GET https://api.forhopp.com/v1/charges?limit=10&status=captured \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /charges/{charge_id}/capturecurl -X POST https://api.forhopp.com/v1/charges/{charge_id}/capture \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /charges/{charge_id}/refundscurl -X POST https://api.forhopp.com/v1/charges/{charge_id}/refunds \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /webhookscurl -X POST https://api.forhopp.com/v1/webhooks \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /keyscurl -X POST https://api.forhopp.com/v1/keys \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve documentation
Retrieves a documentation resource with the specified parameters.
Endpoint
GET /keyscurl -X GET https://api.forhopp.com/v1/keys \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Documentation
Retrieves a documentation resource with the specified parameters.
Endpoint
DELETE /keys/{key_id}curl -X DELETE https://api.forhopp.com/v1/keys/{key_id} \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create documentation
Creates a documentation resource with the specified parameters.
Endpoint
POST /chargescurl -X POST https://api.forhopp.com/v1/charges \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create authentication
Creates a authentication resource with the specified parameters.
Endpoint
POST /api/v1/connect/keysParameters
The name parameter.
The environment parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/keys \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Production Key",
"environment": "live"
}'Authentication
Retrieves a authentication resource with the specified parameters.
Endpoint
DELETE /api/v1/connect/keys/{id}curl -X DELETE https://api.forhopp.com/v1/api/v1/connect/keys/{id} \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve authentication
Retrieves a authentication resource with the specified parameters.
Endpoint
GET /api/v1/connect/keyscurl -X GET https://api.forhopp.com/v1/api/v1/connect/keys \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create charges
Creates a charges resource with the specified parameters.
Endpoint
POST /api/v1/connect/chargesParameters
The amount parameter.
The currency parameter.
The description parameter.
The metadata parameter.
The returnUrl parameter.
The cancelUrl parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/charges \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "usd",
"description": "Order #12345",
"metadata": {
"order_id": "12345",
"customer_email": "customer@example.com"
},
"returnUrl": "https://merchant.com/success",
"cancelUrl": "https://merchant.com/cancel"
}'Retrieve charges
Retrieves a charges resource with the specified parameters.
Endpoint
GET /api/v1/connect/charges/ch_xxxcurl -X GET https://api.forhopp.com/v1/api/v1/connect/charges/ch_xxx \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve charges
Retrieves a charges resource with the specified parameters.
Endpoint
GET /api/v1/connect/charges?status=captured&limit=25&created_after=1711814400curl -X GET https://api.forhopp.com/v1/api/v1/connect/charges?status=captured&limit=25&created_after=1711814400 \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create charges
Creates a charges resource with the specified parameters.
Endpoint
POST /api/v1/connect/charges/ch_xxx/capturecurl -X POST https://api.forhopp.com/v1/api/v1/connect/charges/ch_xxx/capture \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create charges
Creates a charges resource with the specified parameters.
Endpoint
POST /api/v1/connect/charges/ch_xxx/captureParameters
The amount parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/charges/ch_xxx/capture \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 3000
}'Create charges
Creates a charges resource with the specified parameters.
Endpoint
POST /api/v1/connect/charges/ch_xxx/refundscurl -X POST https://api.forhopp.com/v1/api/v1/connect/charges/ch_xxx/refunds \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create charges
Creates a charges resource with the specified parameters.
Endpoint
POST /api/v1/connect/charges/ch_xxx/refundsParameters
The amount parameter.
The reason parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/charges/ch_xxx/refunds \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"reason": "customer_request"
}'Retrieve hosted checkout
Retrieves a hosted checkout resource with the specified parameters.
Endpoint
GET /checkout/ch_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6curl -X GET https://api.forhopp.com/v1/checkout/ch_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create hosted checkout
Creates a hosted checkout resource with the specified parameters.
Endpoint
POST /checkout/ch_xxx/completeParameters
The paymentMethod parameter.
The paymentMethodDetails parameter.
curl -X POST https://api.forhopp.com/v1/checkout/ch_xxx/complete \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"paymentMethod": "card",
"paymentMethodDetails": {
"card_number": "4242424242424242",
"exp_month": 12,
"exp_year": 2030,
"cvc": "123"
}
}'Retrieve payouts
Retrieves a payouts resource with the specified parameters.
Endpoint
GET /api/v1/connect/balancecurl -X GET https://api.forhopp.com/v1/api/v1/connect/balance \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create recurring billing
Creates a recurring billing resource with the specified parameters.
Endpoint
POST /api/v1/connect/tax-ratesParameters
The percentage parameter.
The display_name parameter.
The jurisdiction parameter.
The inclusive parameter.
The country parameter.
The state parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/tax-rates \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"percentage": "8.875",
"display_name": "NY Sales Tax",
"jurisdiction": "US-NY",
"inclusive": false,
"country": "US",
"state": "NY"
}'Create recurring billing
Creates a recurring billing resource with the specified parameters.
Endpoint
POST /api/v1/connect/portal-sessionsParameters
The customer_id parameter.
The return_url parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/portal-sessions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_xxx",
"return_url": "https://merchant.com/account"
}'Create recurring billing
Creates a recurring billing resource with the specified parameters.
Endpoint
POST /api/v1/connect/planscurl -X POST https://api.forhopp.com/v1/api/v1/connect/plans \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create recurring billing
Creates a recurring billing resource with the specified parameters.
Endpoint
POST /api/v1/connect/plans/{planId}/pricescurl -X POST https://api.forhopp.com/v1/api/v1/connect/plans/{planId}/prices \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create recurring billing
Creates a recurring billing resource with the specified parameters.
Endpoint
POST /api/v1/connect/customers/{customerId}/payment-methodscurl -X POST https://api.forhopp.com/v1/api/v1/connect/customers/{customerId}/payment-methods \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscription addons
Creates a subscription addons resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptions/sub_xxx/itemsParameters
The priceId parameter.
The quantity parameter.
The prorationBehavior parameter.
The metadata parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/items \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"priceId": "price_addon123",
"quantity": 2,
"prorationBehavior": "defer_to_next_cycle",
"metadata": { "feature": "extra_storage" }
}'Subscription Addons
Retrieves a subscription addons resource with the specified parameters.
Endpoint
PATCH /api/v1/connect/subscriptions/sub_xxx/items/si_item_xxxParameters
The quantity parameter.
curl -X PATCH https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/items/si_item_xxx \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "quantity": 5 }'Subscription Addons
Retrieves a subscription addons resource with the specified parameters.
Endpoint
DELETE /api/v1/connect/subscriptions/sub_xxx/items/si_item_xxx?immediate=falsecurl -X DELETE https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/items/si_item_xxx?immediate=false \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/plansParameters
The name parameter.
The description parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/plans \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "name": "SaaS Pro Plan", "description": "Full access to our platform" }'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/plans/plan_a1b2c3d4/pricesParameters
The amount_cents parameter.
The currency parameter.
The interval parameter.
The interval_count parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/plans/plan_a1b2c3d4/prices \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "amount_cents": 2000, "currency": "USD", "interval": "monthly", "interval_count": 1 }'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/webhooksParameters
The url parameter.
The events parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/webhooks \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://my-saas.com/api/webhooks/forhopp",
"events": [
"charge.captured",
"subscription.created",
"invoice.paid",
"invoice.payment_failed",
"subscription.canceled"
]
}'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/customersParameters
The email parameter.
The name parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/customers \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "email": "john@example.com", "name": "John Doe" }'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/chargesParameters
The amount parameter.
The currency parameter.
The description parameter.
The customerEmail parameter.
The metadata parameter.
The returnUrl parameter.
The cancelUrl parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/charges \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 2000,
"currency": "usd",
"description": "SaaS Pro Plan - Monthly Subscription",
"customerEmail": "john@example.com",
"metadata": {
"customer_id": "cus_xxx",
"price_id": "price_x1y2z3",
"intent": "subscription"
},
"returnUrl": "https://my-saas.com/payment/success?session={CHARGE_ID}",
"cancelUrl": "https://my-saas.com/pricing"
}'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptionsParameters
The customer_id parameter.
The price_id parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_xxx",
"price_id": "price_x1y2z3"
}'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/chargesParameters
The amount parameter.
The currency parameter.
The description parameter.
The customerEmail parameter.
The metadata parameter.
The returnUrl parameter.
The cancelUrl parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/charges \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "usd",
"description": "50 AI Credits Pack",
"customerEmail": "john@example.com",
"metadata": {
"intent": "one_time",
"product": "ai_credits_50"
},
"returnUrl": "https://my-saas.com/purchase/success",
"cancelUrl": "https://my-saas.com/store"
}'Retrieve subscription checkout flow
Retrieves a subscription checkout flow resource with the specified parameters.
Endpoint
GET /api/v1/connect/balancecurl -X GET https://api.forhopp.com/v1/api/v1/connect/balance \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve subscription checkout flow
Retrieves a subscription checkout flow resource with the specified parameters.
Endpoint
GET /api/v1/connect/subscriptionscurl -X GET https://api.forhopp.com/v1/api/v1/connect/subscriptions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve subscription checkout flow
Retrieves a subscription checkout flow resource with the specified parameters.
Endpoint
GET /api/v1/connect/invoicescurl -X GET https://api.forhopp.com/v1/api/v1/connect/invoices \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscription checkout flow
Creates a subscription checkout flow resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptions/sub_xxx/cancel?at_period_end=truecurl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/cancel?at_period_end=true \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscriptions
Creates a subscriptions resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptionsParameters
The customer_id parameter.
The price_id parameter.
The collection_method parameter.
The tax_rate_id parameter.
The metadata parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_abc123",
"price_id": "price_xyz789",
"collection_method": "charge_automatically",
"tax_rate_id": "txr_xxx",
"metadata": { "plan_name": "Pro" }
}'Retrieve subscriptions
Retrieves a subscriptions resource with the specified parameters.
Endpoint
GET /api/v1/connect/subscriptionscurl -X GET https://api.forhopp.com/v1/api/v1/connect/subscriptions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Retrieve subscriptions
Retrieves a subscriptions resource with the specified parameters.
Endpoint
GET /api/v1/connect/subscriptions/sub_xxxcurl -X GET https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscriptions
Creates a subscriptions resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptions/sub_xxx/cancel?at_period_end=truecurl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/cancel?at_period_end=true \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscriptions
Creates a subscriptions resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptions/sub_xxx/pausecurl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/pause \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create subscriptions
Creates a subscriptions resource with the specified parameters.
Endpoint
POST /api/v1/connect/subscriptions/sub_xxx/resumecurl -X POST https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx/resume \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Subscriptions
Retrieves a subscriptions resource with the specified parameters.
Endpoint
PATCH /api/v1/connect/subscriptions/sub_xxxParameters
The price_id parameter.
The proration_behavior parameter.
The metadata parameter.
curl -X PATCH https://api.forhopp.com/v1/api/v1/connect/subscriptions/sub_xxx \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"price_id": "price_new456",
"proration_behavior": "create_prorations",
"metadata": { "upgrade_reason": "user_requested" }
}'Retrieve subscriptions
Retrieves a subscriptions resource with the specified parameters.
Endpoint
GET /api/v1/connect/balancecurl -X GET https://api.forhopp.com/v1/api/v1/connect/balance \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{}'Create webhooks
Creates a webhooks resource with the specified parameters.
Endpoint
POST /api/v1/connect/webhooksParameters
The url parameter.
The events parameter.
The description parameter.
curl -X POST https://api.forhopp.com/v1/api/v1/connect/webhooks \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://merchant.com/webhooks/forhopppay",
"events": ["charge.completed", "charge.refunded", "charge.disputed"],
"description": "Production webhook"
}'