#boobiq-klarna-charge

1 messages ยท Page 1 of 1 (latest)

lime barn
#

What is the id of the charge that you are looking at? (ch_123)

alpine wren
#

py_1HtM34FCDqfm2cm3UEAMt6K7 for example, but all I checked have same structure

lime barn
#

Thank you

alpine wren
#
  "payment_method_details": {
    "klarna": {
      "payment_method_category": "pay_now",
      "preferred_locale": "de-AT"
    },
    "type": "klarna"
  },
icy plume
#

@alpine wren payment_method_details[klarna] is empty in our docs/spec. Where do you get that JSON from right now?

#

because when we look at the Charge creation request, the response is empty (as expected)

#

Okay I think it's because you're in a beta

alpine wren
#

hmm, might be, we are using Klarna with Sources API

icy plume
#

Your account is clearly gated in a beta for Klarna + PaymentMethod, and because of this you get payment_method_details[klarna] set

alpine wren
#

JSON is from stripe --api-key ... get py_1HtM34FCDqfm2cm3UEAMt6K7 but also I can see this info in Dashboard when I open the charge

#

and being in beta now means we get more info that non-beta accounts?

icy plume
#

yes

alpine wren
#

and is there any ETA for getting out of beta status?

#

sorry for maybe stupid question but how is it possible to use Klarna differently? one needs to use Sources or PaymentIntent API, right?

#

and according to docs both of them are in beta

wispy raven
#

I don't know a specific date for getting out of beta, but let me see if there's something I can share publicly

icy plume
#

Nah we don't share anything publicly ๐Ÿ™‚

#

you're in the beta so you have access to those extra properties

alpine wren
#

I take it as "tomorrow" ๐Ÿ˜›

#

okay, all clear now, maybe we can work around it by custom unmarshaling, let's see, thank you guys!

icy plume
#

Yeah custom unmarshalling is the best option

#
_ = json.Unmarshal(s.LastResponse.RawJSON, &rawData)
int64(rawData["created"].(float64))

transferData, ok := rawData["transfer_data"].(map[string]interface{})
if ok {
  transferData["amount_percent"].(float64))
}```
something like this (but tweak it for the right path you want)