#syjust_api

1 messages ยท Page 1 of 1 (latest)

visual hornetBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1265602319756689468

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

marble patrol
#

๐Ÿ‘‹ happy to help

candid yoke
#

Hi @marble patrol , nice to meet you ๐Ÿ˜ ๐Ÿ‘‹

marble patrol
#

so when you created the Checkout Session you created it on your connected account making it a Direct Charge

#

unfortunately, Paypal doesn't support that type of charges

candid yoke
#

I'am not sure about that ?
Direct Charge is a Connect feature I guess ... no ?
In my case, the charge is created by the CheckoutSession... am I right ?

marble patrol
#

Direct Charge is a Connect feature I guess ... no ?
correct

#

Oh I see what's happening

#

you're using a plugin

#

so it's technically the plugin that is creating the Charge on your account (as a Connected Account to WP Simple Pay)

candid yoke
#

Then my Stripe Account is not a connected or platform account ๐Ÿ˜ฌ
Here is the payload I send to create the checkout Session

array (
  'locale' => 'fr',
  'metadata' =>
  array (
    'simpay_form_id' => 256850,
  ),
  'payment_method_types' =>
  array (
    0 => 'card',
    1 => 'sepa_debit',
    2 => 'paypal',
  ),
  'mode' => 'subscription',
  'billing_address_collection' => 'auto',
  'success_url' => 'https://unedicteeparjour.fr/paiement-ok/?form_id=256850&session_id={CHECKOUT_SESSION_ID}',
  'cancel_url' => 'https://unedicteeparjour.fr/paiement-ko/',
  'line_items' =>
  array (
    0 =>
    array (
      'price' => 'price_1MA9mLDiSm7ZOxzp9Aql9f2X',
      'quantity' => 1,
      'adjustable_quantity' => NULL,
    ),
  ),
  'subscription_data' =>
  array (
    'metadata' =>
    array (
      'simpay_form_id' => 256850,
      'simpay_price_instances' => '11a6339d-a4e1-49f1-ae6c-8b4c4baca7b9:1',
      'simpay_subscription_key' => '9df4bca8fd313548dfc709e8d5f94b56',
      'useremailwp' => 'ann.bonny@justdevops.com',
      'useridwp' => '97681',
    ),
  ),
)
candid yoke
marble patrol
#

it is a Standard Account, but you connected it to WP Simple Pay

#

back in 2019

candid yoke
#

So, the charge is made by a different account that mine acct_1DMJwPDiSm7ZOxzp (with another API key that mine) ?
Is there a way to change this behavior (using another API Key I guess ?)

marble patrol
#

you're not directly integrating with Stripe

#

instead you're using WP Simple Pay

visual hornetBOT
candid yoke
#

But I can see the API call in my stripe account, so this calls are made into my account, not into the WPSimplePay account ?
In my WP SimplePay account, I can see that my account is directly connected
The Stripe webhooks configured to to callback my website are in my own account....
It makes no sense
I am pretty sure that all Stripe API calls are made with my own account and not over a WP Simple Pay Platform account at this time (the logs in my Stripe Dashboard are a proof ... no?)

marble patrol
#

a Direct Charge means that the Platform calls the APIs on your behalf

sturdy harness
#

you can see the logs in your account but it's the platform who calls the API.

marble patrol
#

and create the objects on your account