updated the generate_payment_json method