Forum Academy Marketplace Showcase Pricing Features

Stripe Ephemeral Key: API Formatting Question

I’m building an iOS app that uses Bubble as the backend. I’m trying to integrate with Stripe, which requires fetching an ephemeral key from Stripe, and forwarding the EXACT response to my iOS app.

I’m running into an issue where Bubble returns different dictionary keys in its response.

For example:

"secret": ek_test0x0,

is transformed into:

"_api_c2_secret": ek_test0x0

Is there any way to have Bubble return data EXACTLY how it is fetched from Stripe?

Here is the raw data from Stripe, and the data as it is returned from Bubble.

Stripe Ephemeral Key Data:

{
"id": "ephkey_1H1kDfJ4pFTXGjewihKK8rfj",
"object": "ephemeral_key",
"associated_objects": [
    {
        "type": "customer",
        "id": "cus_GX0"
    }
],
"created": 1594003091,
"expires": 1594006691,
"livemode": false,
"secret": "ek_test_YWNjdF8xRVdXWjhKNHBGVFhHamV3LGdESmlpckswbkJrTzNlUEdBNG5kTHNSRWdoQ3hqWmw_00GdAbeZ7R"

}

Bubble (Return from API) Data:

{
        "_api_c2_associated_objects" =             (
                            {
                "_api_c2_id" = "cus_GX0";
                "_api_c2_type" = customer;
                "_id" = 5b235a0bb8a7fd03638bb5cfa52c66cf;
            }
        );
        "_api_c2_created" = 1594002708;
        "_api_c2_expires" = 1594006308;
        "_api_c2_id" = "ephkey_1H1k7UJ4pFTXGjew7NPrGOSp";
        "_api_c2_livemode" = 0;
        "_api_c2_object" = "ephemeral_key";
        "_api_c2_secret" = "ek_test_YWNjdF8xRVdXWjhKNHBGVFhHamV3LEhaQ3dkcnVTQXJzWjFKNktBUGQ2MndnRzhjSmVMUU8_00qdQsGw40";
        "_id" = 1fdca9195dd1d3f63fd314acaa2727ce;
    };

Hello, I am running to the same issue.
Were you able to figure how to solve it?