Abstract: A merchant system offers various products for sale to users. The merchant system receives a set of application programming interface (API) calls from an online system allowing the merchant system to provide a user with a virtual credit card when the user is purchasing products via the merchant system. The merchant system provides one or more conditions to the online system and provides information describing an order by a user via the merchant system. By applying a machine learned model to characteristics of the users and characteristics of one or more orders by the merchant system, the online system determines an amount for the virtual credit card. When the user's order satisfies the conditions, the online system issues the virtual credit card and transmits information describing the virtual credit card to the merchant system, which the virtual credit card information to the user while the user completes the order.