API to create order

I am working on an API to take card and make order but its creating them as “offline”. How do I make it work so it charges the order online now?

If you’re making a POST to /orders/{orderId}/payments to charge the card, if you set the “charge_now” property to true it should immediately process the payment.

https://developer.infusionsoft.com/docs/rest/#!/E-Commerce/createPaymentOnOrderUsingPOST

{
  "apply_to_commissions": true,
  "charge_now": true,
  "credit_card_id": 0,
  "date": "2021-01-27T19:51:27.312Z",
  "notes": "string",
  "payment_amount": "string",
  "payment_gateway_id": "string",
  "payment_method_type": "CREDIT_CARD"
}

awesome. that worked.