#José Anchieta

1 messages · Page 1 of 1 (latest)

ripe lodgeBOT
quaint obsidian
wet hinge
#

I'm trying like this:

  {
    customer: "cus_L0PKrizM5KscSU",
    amount: 1099,
    currency: 'brl',
    payment_method_types: ['pix'],
    payment_method_options: {
      pix: {
        expires_after_seconds: 2000
      }
    }
  }
)
quaint obsidian
#

Right, so then you'd need to do the client side step to complete that

wet hinge
#

And this is what i get:

  "id": "pi_3M4ragCBBZfRcKlq0sGu0Bef",
  "object": "payment_intent",
  "amount": 1099,
  "amount_capturable": 0,
  "amount_details": {"tip":{}},
  "amount_received": 0,
  "application": null,
  "application_fee_amount": null,
  "automatic_payment_methods": null,
  "canceled_at": null,
  "cancellation_reason": null,
  "capture_method": "automatic",
  "charges": {"object":"list","data":[],"has_more":false,"total_count":0,"url":"/v1/charges?payment_intent=pi_3M4ragCBBZfRcKlq0sGu0Bef"},
  "confirmation_method": "automatic",
  "created": 1668628090,
  "currency": "brl",
  "customer": "cus_L0PKrizM5KscSU",
  "description": null,
  "invoice": null,
  "last_payment_error": null,
  "livemode": false,
  "metadata": {},
  "next_action": null,
  "on_behalf_of": null,
  "payment_method": null,
  "payment_method_options": {"pix":{"expires_after_seconds":2000,"expires_at":null}},
  "payment_method_types": [
    "pix"
  ],
  "processing": null,
  "receipt_email": null,
  "review": null,
  "setup_future_usage": null,
  "shipping": null,
  "source": null,
  "statement_descriptor": null,
  "statement_descriptor_suffix": null,
  "status": "requires_payment_method",
  "transfer_data": null,
  "transfer_group": null
}```
#

Do i need to do something on the client side since i'm using the API?

quaint obsidian
#

(its test mode, but you should remove the client_secret there -- those should not be shared)

wet hinge
#

Nice tip, thanks.

#

Today i checked and the Pix payment type is enabled on Production and Test, so probably i'm not passing the correct arguments to the PaymentIntent creation.

quaint obsidian
#

requires_payment_method is expected, you then need to complete the payment on the client side app with your customer