ARTICLE AD BOX
Problem
I am building a custom WooCommerce plugin that integrates with the Partial.ly
API to create installment payment plans. I am following the official Partial.ly
documentation for creating a custom checkout UI: https://developer.partial.ly/#create-your-own-checkout-ui
My Flow
Call Partial.ly API to create a payment plan with create_stripe_payment_intent: true
Partial.ly returns a client_secret in the payment_intent key
Customer fills card details on our custom page using Stripe Payment Element
Call PUT /api/payment_schedule/sign/{id} to sign the contract
Call stripe.confirmPayment() on the front-end with the client_secret
The Error
Every payment is failing with this Stripe error:
"Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter)."
Webhook Payload Analysis
When I check the Partial.ly webhook data for the failed payment, I can see:
{ "charge_type": "direct", "fee": 2.80, "processor_destination_id": null, "status": "failed", "message": "Can only apply an application_fee when the request is made on behalf of another account..." }Root Cause (My Analysis)
Partial.ly is internally adding `application_fee` when it creates the
Stripe PaymentIntent on my behalf. However:
My Stripe account is connected to Partial.ly via direct API Key
I am NOT using OAuth / Stripe Connect
Stripe only allows application_fee when using OAuth or Stripe Connect
So Partial.ly is sending application_fee to Stripe, but since there is no OAuth connection, Stripe rejects the entire PaymentIntent.
My Setup
Plugin: Custom WooCommerce Payment Gateway (PHP)
Integration: Partial.ly REST API
Stripe connection: Direct API Key (pk_test_ / sk_test_)
Environment: demo.partial.ly (test mode)
WooCommerce: 10.7.0
Code (Payment Plan Creation)
$result = $api-\>create_payment_plan([ 'offer_id' => $offer_id, 'integration' => 'woocommerce', 'integration_id' => (string) $order-\>get_id(), 'amount' => $order-\>get_total(), 'currency' => get_woocommerce_currency(), 'create_stripe_payment_intent' => true, 'customer' => [ 'first_name' => $order->get_billing_first_name(), 'last_name' => $order->get_billing_last_name(), 'email' => $order->get_billing_email(), ], ]); **Front-end (stripe.confirmPayment)** stripe.confirmPayment({ elements: elements, confirmParams: { return_url: returnUrl, }, });Question
Is this a known issue with Partial.ly when using a direct API Key instead of OAuth? Has anyone successfully used create_stripe_payment_intent: true with a direct API Key connection?
Is there any workaround? For example, should I be using the PUT /api/payment_plan/open/{id} endpoint differently, or is this purely a Partial.ly account configuration issue?
