0
votes

I'm trying to add an application percentage fee and a destination for the subscription charge. I'm following the docs (https://stripe.com/docs/connect/subscriptions)

This works fine without transfer_data.

    sub = stripe.Subscription.create(
        customer=_stripe_customer_id,
        items=[
            {
            "plan": _plan_id,
            },
        ],
        transfer_data={
            "destination": _destination_id,
        },
        application_fee_percent = mooch_application_fee_percent,
    )
    return sub

This is the error I'm getting 'Received unknown parameter: transfer_data'

I don't know what I should be doing.

1

1 Answers

1
votes

I don't see transfer_data in the list of fields for subscription object. Ref: https://stripe.com/docs/api/subscriptions/object#subscription_object-customer

You may use metadata to store custom data. If the destination_id is a stripe account id, use stripe_account instead of transfer_data.