Subscription Payment link issue

Hi,

This is production and not sandbox.

I’ve got a weird issue. I’m using PHP, i’ve set up a quick pay payment link with subscription plan.

The payment link works fine and has the correct charges on it, after filling in the bank card details and then going to the bank app to pay, it is not showing the correct amount, it’s showing 0.00.

The order state never changes and stays DRAFT, no payment is created because it’s 0.00, so no payment details are created.

When i check the subscription in the dashboard, it’s created the customer and the subscription, the amount shows correct here, but the subscription is not charged.

I’m confused, it was working fine before, not sure what’s happened.

Cheers,
dmxit

Are you seeing the payment in the Square account? If so it looks like this is an issue with the banks app not picking up the amount. :slightly_smiling_face:

Hi Bryan,

Ok, narrowed down the issue to the below.

When i include a shipping fee with the payment link, the payment is never taken straight away.

If i exclude the shipping fee, then it works fine.

Why is it when a shipping fee is provided that subscription shows as not paid?

     $charge = new \Square\Models\Money();
     $charge->setAmount(200);
     $charge->setCurrency('GBP');

     $shipping_fee = new \Square\Models\ShippingFee($charge);
     $shipping_fee->setName('Card processing fee');  

     $quick_pay = new \Square\Models\QuickPay(
        $plan_friendly_name,
        $price_money,
        $location_id
     );

     $accepted_payment_methods = new \Square\Models\AcceptedPaymentMethods();
     $accepted_payment_methods->setApplePay(true);
     $accepted_payment_methods->setGooglePay(true);

     $checkout_options = new \Square\Models\CheckoutOptions();
     $checkout_options->setSubscriptionPlanId($plan_id);
     $checkout_options->setAskForShippingAddress(false);
     $checkout_options->setShippingFee($shipping_fee); 

Regards,
dmxit

Hi Bryan,

I’ve narrowed down the issue to including a shipping fee to a quick pay subscription payment link causing the issue.

I’ve noticed that when i include a shipping fee with the checkout options then an invoice is not automatically created and paid by the customer.

The subscription is active but not paid.

If i exclude the shipping fee from the checkout options, all works fine, the subscription is created, an invoice is raised automatically and marked paid by the customer and all is good.

Do we support shipping fee with quickpay at the checkout options for a subscription payment link?

Regards,
dmxit

I just tested and when the link was paid for the invoice emails sent. Do you have an example of this behavior? What’s your request body that your passing in the API call. :slightly_smiling_face:

Hi Bryan,

If i use the code below and create a payment link, after the customer pays an invoice is not generated and marked as paid and the subscription link stays as active and doesn’t show paid.

         $price_money = new \Square\Models\Money();
         $price_money->setAmount($luna_subscription_charge);
         $price_money->setCurrency('GBP');

         $charge = new \Square\Models\Money();
         $charge->setAmount(200);
         $charge->setCurrency('GBP');

         $shipping_fee = new \Square\Models\ShippingFee($charge);
         $shipping_fee->setName('Card processing fee');

         $quick_pay = new \Square\Models\QuickPay(
            $plan_friendly_name,
            $price_money,
            $location_id
         );

         $accepted_payment_methods = new \Square\Models\AcceptedPaymentMethods();
         $accepted_payment_methods->setApplePay(true);
         $accepted_payment_methods->setGooglePay(true);

         $checkout_options = new \Square\Models\CheckoutOptions();
         $checkout_options->setSubscriptionPlanId($plan_id);
         $checkout_options->setRedirectUrl('https://mywebsite.com/summary_page');
         $checkout_options->setMerchantSupportEmail('[email protected]');
         $checkout_options->setAskForShippingAddress(false);
         $checkout_options->setAcceptedPaymentMethods($accepted_payment_methods);
         $checkout_options->setShippingFee($shipping_fee); 

         $buyer_address = new \Square\Models\Address();
         $buyer_address->setFirstName($customer_firstname);
         $buyer_address->setLastName($customer_lastname);

         $pre_populated_data = new \Square\Models\PrePopulatedData();
         $pre_populated_data->setBuyerEmail($customer_email);
         $pre_populated_data->setBuyerAddress($buyer_address);

         $body = new \Square\Models\CreatePaymentLinkRequest();
         $body->setIdempotencyKey(guidv4($customer_company));
         $body->setDescription($customer_company);
         $body->setQuickPay($quick_pay);
         $body->setCheckoutOptions($checkout_options);
         $body->setPrePopulatedData($pre_populated_data);

         $api_response = $client->getCheckoutApi()->createPaymentLink($body);

Cheers,
dmxit

Do you have the subscription_id for this? We haven’t been able to replicate. :slightly_smiling_face:

Hi Bryan,

Here is an example of one.

c9f5ff9a-d6f1-493c-8832-f0d11d0b6d06

Regards,
dmxit

The team was able to identify the issue and at this time using surcharges/service fees, isn’t supported outside of the US and Canada with our Invoice product which is what Subscriptions uses. The team is going to work on a better validation process so the subscription isn’t created. Unfortunately we don’t have a public roadmap for when this will be available in other supported regions. :slightly_smiling_face: