#petersmithdev
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- peter-reactnative-payment, 16 hours ago, 24 messages
What do you mean by 'extra data'?
For example here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#redirect-customers
I can send all this information:
<?php
require 'vendor/autoload.php';
$stripe = new \Stripe\StripeClient('sk_test_QUXcoU3BnbZXp6IMVi7BkW8s');
$checkout_session = $stripe->checkout->sessions->create([
'line_items' => [[
'price_data' => [
'currency' => 'usd',
'product_data' => [
'name' => 'T-shirt',
],
'unit_amount' => 2000,
],
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => 'http://localhost:4242/success',
'cancel_url' => 'http://localhost:4242/cancel',
]);
header("HTTP/1.1 303 See Other");
header("Location: " . $checkout_session->url);
?>
And I can add extra data "metadata":
'metadata' => [
'access_plan_purchase_id' => 'pok'
]
I need to do the same using this: https://stripe.com/docs/apple-pay?platform=react-native#handle-payment
Then you'd just use the metadata parameter on Payment Intent creation: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.