#loopiiis

1 messages · Page 1 of 1 (latest)

digital muralBOT
mystic shale
midnight hollow
#

Yes! I tested with the key itself which is just a string but it required an object to be passed in i believe

#

so in terms of what is actually needed off the object is it just the secret?

mystic shale
#

Hm, interesting. You may need to pass the entire object then.

midnight hollow
#
{
  "id": "ephkey_1G4V6eEEs6YsaMZ2P1diLWdj",
  "object": "ephemeral_key",
  "associated_objects": [
    {
      "id": "ic_1GWQp6EESaYspYZ9uSEZOcq9",
      "type": "issuing.card"
    }
  ],
  "created": 1586556828,
  "expires": 1586560428,
  "livemode": false,
  "secret": "ek_test_YWNjdF8xRmdlTjZFRHelWWxwWVo5LEtLWFk0amJ2N0JOa0htU1JzEZkd2RpYkpJdnM_00z2ftxCGG"
}
mystic shale
#

Yep, that's the one.

midnight hollow
#

so just "secret": "ek_test_YWNjdF8xRmdlTjZFRHelWWxwWVo5LEtLWFk0amJ2N0JOa0htU1JzEZkd2RpYkpJdnM_00z2ftxCGG" is needed basically on the object?

#
{
  "id": "ephkey_1G4V6eEEs6YsaMZ2P1diLWdj",
  "secret": "ek_test_YWNjdF8xRmdlTjZFRHelWWxwWVo5LEtLWFk0amJ2N0JOa0htU1JzEZkd2RpYkpJdnM_00z2ftxCGG"
}

So an object like this would be okay for the component?

#

just want to make sure all the properties needed from the key by AddToWallet button is covered in our backend mutation

mystic shale
#

Why not just pass the entire object?

#

I'm honestly not sure what the SDK expects to be present, and it might change in a future version, so passing the entire object seems like the best course of action.

midnight hollow
#

Hmmm our backend dev said : " I don’t feel good about doing this raw payload straight from Stripe."

#

but if you think its best then we will do that!

#

thank you for your helpp

mystic shale
#

If that helps. 🙂

#

And then in the next step you fetch it and parse the JSON object.

midnight hollow
#

yess we saw that and decided to change our api to return the whole object, originally we had an edpoint that just returned the secret for a stripe iframe for card details! So I guess maybe the backend dev was wondering if it would be bad to send the whole raw object

#

But i think that's what we'll do since it does follow the documentation!