I understand. Big project!

If you want a shopping cart experience (variable nonprofits and pricing), you’ll need to configure this call using a JSON object instead of parameters like I’ve shown you on the course.

It will look something like this (but with slightly different formatting for dynamic values)

{
      "quantity": 1,
      "price_data": {
        "unit_amount": 1000,
        "currency": "usd",
        "product_data": {
          "name": "Donation to Nonprofit A",
          "description": "Thank you for your generous donation.",
          "images": ["https://yourdomain.com/imageA.jpg"]
        },
        "recurring": {
          "interval": "month"
        }
      }
    }

I’m walking out the door for dinner now but will make a note to come back to you on this.

1 Like