#Suraj-Transfer
1 messages ยท Page 1 of 1 (latest)
how can get status(success,failed etc.) from object when make transfer from platform to connect ..?
??
are you there ..?
Sorry, back
what object do you mean?
When you created a Transfer, you should receive the response of the request as well. It should tell you if the call was succeed
var options = new TransferCreateOptions
{
Amount = 400,
Currency = "usd",
Destination = "acct_1HdqgIGOBPjZ1Bk2",
TransferGroup = "ORDER_95",
};
var service = new TransferService();
service.Create(options);
it does'nt have status ..??
how does the response look like?
if you assign a variable, like
var result = service.Create(options);
then print out result, how does it look like?
i gives only "StatusCode" which is understandable, which is httpcode type
what about "SourceTransaction" in transfer object, it has status in that ..??
Do you see only an ID?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It should be an Id, you would need to "expand" the API call to get the full object
yes, i am following the same thing.
i have found StatusCode which in transferobject, and Status which in transfer.SourceTransaction.Status ..?
are you referring to the status of the Transfer object? whether it's successful or failed?
yes, right
the transfer doesn't have a status because if the request to create it succeeds - the transfer is successful. If the request to create it fails - the transfer fails
so, how to know if it failed or succeed ..?
if the request errors, you'll know that it failed. Does this make sense?
so it raise Exception , this is what you mean ..?
what about "SourceTransaction" in transfer object, it has status in that, what is that ..??
yeah, you can think of it that way
how about this, it is type of charge created on platfrom , right ..? so can i use this as status ..?
the sourceTransaction in a transfer object would refer to a Charge - https://stripe.com/docs/api/charges/object#charge_object-status
which charge it belongs to, customer charge or charge that made on platfrom when making transfer ..?
the customer charge and the charge made on the platform should the same. Can you give me an example object id of each that makes you think they are different?
i am using a separate charge and transfer
my charge id is "pi_3KQWB2GOBPjZ1Bk20K1tPUDl"
when transfering the amount to connect from platfrom i need to make transfer, right
yep
so, when i create transfer then it doen't have same charge object which i have created(pi_3KQWB2GOBPjZ1Bk20K1tPUDl), right ..?
it should have id like "py_*********", like that
i am right
when a PaymentIntent succeeds, there will be a Charge created i.e. ch_ object (assuming we're only talking about card payments here)
so you should pass in the ch_ object into source_transaction
https://stripe.com/docs/api/transfers/create#create_transfer-source_transaction
Were you asking about another object status? You asked about the Transfer status before and I mentioned that as long there no exception thrown when creating the Transfer, the Transfer is successful
the Transfer object itself doesn't have a status parameter if that's what you're asking
yes, that is why am asking about that, in the case of transfer failure it create Exception ,error or what ..??
what's your definition of exception / errors? cause to me an error is a more general term that encompasses exceptions
i would suggest you try to create a transfer with a source transaction that doesn't exist or create a transfer that is more than the amount you have in your balance, then you'll be able to better understand what i mean
if i am using separate charge and transfer, from where stripe take fee ..??
from charge or platform ..?
from the platform
ok thanks, so when i want to transfer, on that time i need to transfer less to get platfrom fee from them, right ..?
yep, you would need to transfer less to the connected account to account for the Stripe fee