#deepakkumar_wizniche
1 messages · Page 1 of 1 (latest)
Hi
Hi, are you able to provide the request id where you're seeing this issue? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
No because my code doesn't request it
it catches error before
(\Stripe\Exception\UnknownApiErrorException $e
It catches UnknownAPIerror before creating the request
Am I typing the paymentLinks wrong?
You're trying to create a Payment Link, is that correct?
What language are you using? I'm unable to identify it from the above snipped as I mainly work on Node.js.
In that case you're code should look something like this:
$stripe->paymentLinks->create([
'line_items' => [
[
'price' => 'price_1LqKJMGHtciddFoAd1bxFjK6',
'quantity' => 1,
],
],
]);
Here is our document for a reference: https://stripe.com/docs/api/payment_links/payment_links/create?lang=php
$charge = \Stripe\Charge::create([
// 'amount' => $data['amount'],
// 'currency' => 'usd',
// 'source' => $data['card_token'],
// 'description' => $data['description'],
// 'transfer_group' => $data['wallet_token'],
// 'application_fee_amount'=>'0',//If Wizniche wants to charge fee per transaction.
// ], ['stripe_account' => $data['wallet_token']]);
But this is how my charge works
That is correct, for creating a charge, that is correct: https://stripe.com/docs/api/charges/create
I see, could you try it with the above example code from the document?
On your code, you're combining the Charges API $charge with the Payment Links API it looks like.
Got it, so you're able to create a Payment Link as expected?