#Thamila

1 messages · Page 1 of 1 (latest)

thin warrenBOT
dense gale
#

hi! what's the error?

warm plaza
#

so when i use this

#

curl -u sk_xxx: https://api.stripe.com/v1/tokens \  -d pk_token=ApplePayPaymentToken.paymentData (decoded as JSON) \  -d pk_token_instrument_name=ApplePayPaymentToken.paymentMethod.displayName  \  -d pk_token_payment_network=ApplePayPaymentToken.paymentMethod.network \  -d pk_token_transaction_id=ApplePayPaymentToken.transactionIdentifier

#

i get this

#

{
"error": {
"message": "You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}

dense gale
#

you need to pass a -u sk_test_xxx: parameter as well — https://stripe.com/docs/api/authentication . Is there more context here? why are you using curl, why are you passing raw Apple Pay details instead of using our frontends?

warm plaza
#

so i had before a conversation with your collegue and in fact i have to do a payementappelpay without using frontend so i have so convert my tokenappelpay to a stripetoken

dense gale
#

to be clear you don't have to use curl really, you'd use whatever it is you are using to call the Stripe API usually, the example is just in curl so it's agnostic.

warm plaza
#

that's means that i don't have to use curl to convert ?

dense gale
#

well you have to call the API to convert the Apple Pay info to a Stripe Token

#

you can use whatever it is you are using to call the Stripe API usually, doesn't have to be curl specifically

warm plaza
#

yes but i cant use payement button or payement request so how can i use stripe api ton convert

#

i use only a server

dense gale
dense gale
warm plaza
#

i juste added stripe to my package

dense gale
#

not sure what that means

warm plaza
dense gale
#

ah ok. Well unfortunately it's really hard to call this API with that library

warm plaza
#

yeah that's why i use curl

dense gale
warm plaza
#

i try to use it like tjis but the AppelPayToken that i get is a string

#

to put it in source

#

var option_token = new Stripe.ChargeCreateOptions();
option_token.Source = AppelPAyToken.Id;

tight bane
#

And I assume that that is erroring out because it is an Apple Pay Token not a stripe one?

#

Have you been able to try that last suggestion of making a Stripe token with the card create call and options.AddExtraParam("pk_token", "<value>")?

warm plaza
#

and what can i put on source ?

#

var options = new CardCreateOptions
{
Source = "?",
};

tight bane
#

Good question. Checking in to this.

warm plaza
#

okey

tight bane
#

Apologies I am still having trouble finding a doc on this source call after the token call. Have you tried making a createSource call here?

  'cus_123',
  {source: 'tok_456'}
);```
warm plaza
#

in my server ?

tight bane
#

Yes

warm plaza
#

i try somthing, well i cant use curl i used postman so i just did the same thing that i have to do with curl but i have an error like " The certificate used to sign your request is invalid"

#

so i juste generate a new certificat like i have to do and i have the same error

warm plaza
livid girder
#

Hi there. Taking over for Pompey as they have to step out. Can you give a quick summary on what you're blocked on? It's the create source API call that's failing?

warm plaza
#

hey thank you so am traying to convert a tokenAppelPay to tokenStripe

#

and i use only a server to do this am with .net

livid girder
#

Got it. Where in your integration is this currently failing?

warm plaza
#

so when i use this like this

#

Stripe.TokenCreateOptions token = new Stripe.TokenCreateOptions();

        token.AddExtraParam("pk_token", "ApplePayPaymentToken.paymentData ");
        token.AddExtraParam("pk_token_instrument_name", "ApplePayPaymentToken.paymentMethod.displayName" );
        token.AddExtraParam("pk_token_payment_network", "ApplePayPaymentToken.paymentMethod.network ");
        token.AddExtraParam("pk_token_transaction_id"," ApplePayPaymentToken.transactionIdentifier ");

        var service_token = new TokenService();
        Stripe.Token newToken = service_token.Create(token);

        var options_token = new ChargeCreateOptions
        {
            Amount = 1000,
            Currency = "eur",
            Source = newToken.Id
             };


            var services = new Stripe.ChargeService();


             Stripe.Charge charge = services.Create(options_token);
#

i have an error like my ios version is not the latest

#

so i tray to do it whith curl and i got " The certificate used to sign your request is invalid"
so i juste generate a new certificat like i have to do and i have the same error

livid girder
#

Ok I re-read the thread. So for this api call, you don't get a certificate error?

#

Just a missing source/customer param error?

warm plaza
#

yes

livid girder
#

Try passing the customer then

warm plaza
warm plaza
livid girder
livid girder
warm plaza
#

i dont have the token's information

#

i get the token as a string

#

so i try to do it with curl but i have always that error "The certificate used to sign your request is invalid"

livid girder
#

You'll need to find a way to get an updated certificate then. We can help with issues in calling the stripe api, but that's a configuration issue on your end

warm plaza
#

i did it just now

#

that's why i cant undrestand why i have this error