Skip to content

npx stripe fixtures doesn't report the country from the billing address #1447

@erwanvivien

Description

@erwanvivien

Issue

Using fixture to generate a transaction, the country is always set to United States (US)

Expected Behavior

Use the country provided in the fixture

Steps to reproduce

{
  "_meta": {
    "template_version": 0
  },
  "fixtures": [
    {
      "name": "checkout_session",
      "path": "/v1/checkout/sessions",
      "method": "post",
      "params": {
        "success_url": "https://httpbin.org/post",
        "cancel_url": "https://httpbin.org/post",
        "mode": "payment",
        "metadata": {
          "firstname": "E",
          "lastname": "V",
          "orderSource": "dropList",
          "priceId": "price_1Sc7NTKGlmKra3A1O0zDePPu",
          "productId": "prod_TZFtASXRqKD9Af",
          "referral": "erwan",
          "tag": "liste-deroulante"
        },
        "line_items": [
          {
            "price": "price_1Sc7NTKGlmKra3A1O0zDePPu",
            "quantity": 1
          }
        ],
        "payment_intent_data": {
          "shipping": {
            "name": "UyHSck",
            "address": {
              "line1": "10 rue de Penthièvre",
              "line2": null,
              "postal_code": "75008",
              "city": "Paris",
              "state": null,
              "country": "FR"
            }
          }
        }
      }
    },
    {
      "name": "payment_page",
      "path": "/v1/payment_pages/${checkout_session:id}",
      "method": "get"
    },
    {
      "name": "payment_method",
      "path": "/v1/payment_methods",
      "method": "post",
      "params": {
        "type": "card",
        "card": {
          "token": "tok_visa"
        },
        "metadata": {
          "firstname": "E",
          "lastname": "V",
          "orderSource": "dropList",
          "priceId": "price_1Sc7NTKGlmKra3A1O0zDePPu",
          "productId": "prod_TZFtASXRqKD9Af",
          "referral": "erwan",
          "tag": "liste-deroulante"
        },
        "billing_details": {
          "email": "stripe+UyHSck@example.com",
          "name": "UyHSck",
          "address": {
            "line1": "10 rue de Penthièvre",
            "line2": null,
            "postal_code": "75008",
            "city": "Paris",
            "state": null,
            "country": "FR"
          }
        }
      }
    },
    {
      "name": "payment_page_confirm",
      "path": "/v1/payment_pages/${checkout_session:id}/confirm",
      "method": "post",
      "params": {
        "payment_method": "${payment_method:id}",
        "expected_amount": 2200
      }
    }
  ]
}

I'm getting the following output:

$ npx stripe fixtures temp_fixture_FR.json
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Setting up fixture for: payment_page
Running fixture for: payment_page
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: payment_page_confirm
Running fixture for: payment_page_confirm

And from the Stripe UI:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions