#roanex_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1387903328876368094
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- roanex_api, 22 hours ago, 15 messages
//set a random key for the transfer group
$transfer_group = substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 90)), 0, 90);
$paymentIntent = $stripe->paymentIntents->create([
'amount' => $newPayAmountInCents, // Amount in cents
'currency' => 'usd',
'payment_method' => $source_url, // Payment Method ID
'confirm' => true,
'statement_descriptor' => 'Roanex Transfer',
'payment_method_types' => ['us_bank_account'], // Explicitly allow US bank account
'return_url' => 'https://roanex.com/settlements', // URL to redirect after payment
'metadata' => [
'description' => 'payment to payer account',
'transfer_group' => $transfer_group,
'payee' => $user_stripe_id, //connected account
'payer' => $stripe_connect_id, //company/payer connected account id
'my_company' => $my_company,
'total_amount' => $newPayAmountInCents,
'settlement_id' => $settlementId,
'user_source_last_4' => $user_source_last_4,
'user_source_url' => $user_source_url,
'payment_method' => $source_url,
'amountToPlatform' => $amountInCents + 100,
'amountToPayee' => $amountInCents,
'user' => $userToPay,
],
'mandate_data' => [
'customer_acceptance' => [
'type' => 'online', // or 'offline', depending on how you collect acceptance
'online' => [
'ip_address' => $_SERVER['REMOTE_ADDR'], // IP address of the customer
'user_agent' => $_SERVER['HTTP_USER_AGENT'], // User agent string
],
],
],
], [
'stripe_account' => $stripe_connect_id, // Connected account ID
]);
my code
to retrieve:
$check_payout = $stripe->paymentIntents->retrieve(
$transactionURL,
[]
);
error: resource_missing - intent
No such payment_intent: 'pi_3Re1O9QvftpzcUxp0oLwLu35'
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such payment_intent: 'pi_3Re1O9QvftpzcUxp0oLwLu35'",
"param": "intent",
"request_log_url": "https://dashboard.stripe.com/logs/req_Nrpo257RduSV4o?t=1750970769",
"type": "invalid_request_error"
}
}
Hi there
it says no such paymetn intent with pi_3Re1O9QvftpzcUxp0oLwLu35, sorry the payment is pending not processing
Hi
so this is a Direct Charge. That means that the PaymentIntent object exists on the connected account. If you're trying to retrieve it on the platform account, you need to use the Stripe-Account header
the link says access denied
try again, please
thanks
This is showing how to create it
How do I retrieve it?
I dont see it
The doc illustrates how to use the Stripe-Header. The given example is PaymentIntent creation
You would apply that approach to using another method on your SDK of choice - PaymentIntent retrieve in this case
So nI would retrieve it like:
$check_intent = $stripe->paymentIntents->retrieve(
$transactionURL,
[],
['stripe_account' => '{{CONNECTED_ACCOUNT_ID}}']
);
?
it gives me an error $check_intent = $stripe->paymentIntents->retrieve(
$transactionURL,
[],
['stripe_account' => $payer]
);
also tried
$check_intent = $stripe->paymentIntents->retrieve(
$transactionURL,
['stripe_account' => $payer]
);
the syntax needs to look something like
$paymentIntent = $stripe->paymentIntents->retrieve('pi_123abc', [],
['stripe_account' => 'acct_123abc']);
no problem
one more question, can a payment that is processing be cancelled?